Open ionelmc opened 7 years ago
Would have to know where you are proposing the change be made. There are use cases for wrapt module proxy objects whereby users will create a class which derives from the wrapt proxy type. If an exact match is used, then presumably that case would fail.
PyObject_TypeCheck returns true if the object o is of type type or a subtype of type. It's basically a simpler check that don't involve __instancecheck__
.
About where, all the places that have code like:
if (PyObject_IsInstance(o1, (PyObject *)&WraptObjectProxy_Type))
o1 = ((WraptObjectProxyObject *)o1)->wrapped;
And yes, I'm quite lazy, I'm just putting this idea up for discussion xD
This idea originated here: https://github.com/ionelmc/python-lazy-object-proxy/pull/18
Perhaps wrapt could do this as well. Opinions?