This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Trundle
Recipients DasIch, Trundle
Date 2011-01-17.02:50:10
SpamBayes Score 5.774504e-10
Marked as misclassified No
Message-id <1295232618.79.0.667282638529.issue10922@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-01-17 02:50:18Trundlesetrecipients: + Trundle, DasIch
2011-01-17 02:50:18Trundlesetmessageid: <1295232618.79.0.667282638529.issue10922@psf.upfronthosting.co.za>
2011-01-17 02:50:11Trundlelinkissue10922 messages
2011-01-17 02:50:11Trundlecreate