Commit 0a90b2db authored by Jason Rhinelander's avatar Jason Rhinelander
Browse files

Don't let PyInstanceMethod hide itself

Python 3's `PyInstanceMethod_Type` hides itself via its `tp_descr_get`,
which prevents aliasing methods via `cls.attr("m2") = cls.attr("m1")`:
instead the `tp_descr_get` returns a plain function, when called on a
class, or a `PyMethod`, when called on an instance.  Override that
behaviour for pybind11 types with a special bypass for
`PyInstanceMethod_Types`.
parent a7f704b3
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment