We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c76d67e commit 301256cCopy full SHA for 301256c
src/object/function.cpp
@@ -586,6 +586,13 @@ BOOST_PYTHON_DECL void add_to_namespace(
586
587
BOOST_PYTHON_DECL object const& add_doc(object const& attribute, char const* doc)
588
{
589
+#if PY_VERSION_HEX >= 0x03000000
590
+ if (PyInstanceMethod_Check(attribute.ptr())) {
591
+#else
592
+ if (PyMethod_Check(attribute.ptr())) {
593
+#endif
594
+ return attribute;
595
+ }
596
return function::add_doc(attribute, doc);
597
}
598
0 commit comments