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 yselivanov
Recipients Claudiu.Popa, larry, ncoghlan, yselivanov
Date 2014-06-20.18:13:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1403288036.4.0.553201925868.issue21801@psf.upfronthosting.co.za>
In-reply-to
Content
This behaviour is indeed a bug. However, I think that the solution you propose is wrong.

If we ignore invalid contents of __signature__ we are masking a bug or incorrect behaviour. In this case, you should have checked the requested attribute name in '__getattr__', and return something other than _Method, if it is a '__signature__'.

Please find attached a patch, that checks if __signature__ is an instance of Signature class, and raises a TypeError if it isn't.
History
Date User Action Args
2014-06-20 18:13:56yselivanovsetrecipients: + yselivanov, ncoghlan, larry, Claudiu.Popa
2014-06-20 18:13:56yselivanovsetmessageid: <1403288036.4.0.553201925868.issue21801@psf.upfronthosting.co.za>
2014-06-20 18:13:56yselivanovlinkissue21801 messages
2014-06-20 18:13:56yselivanovcreate