Andreas Stührk <andy-pyt...@hammerhartes.de> added the comment:

I think this is a duplicate of issue #9756: `methoddescr_call()` checks whether 
the given argument is acceptable as "self" argument and does so using 
`PyObject_IsInstance()`. As the class in the given code returns the type of the 
proxied object for the `__class__` attribute, that check will return true.

As a quick fix, the attached patch (against release27-maint branch) will raise 
a TypeError as expected by the OP, but the real issue is much broader.

----------
keywords: +patch
nosy: +Trundle
Added file: http://bugs.python.org/file20421/check_is_func.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10922>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to