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 eric.snow
Recipients Claudiu.Popa, belopolsky, christian.heimes, eric.snow, ethan.furman, ionelmc, jedwards, llllllllll, r.david.murray, rhettinger, steven.daprano, terry.reedy
Date 2015-04-19.22:10:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429481425.17.0.10192639604.issue23990@psf.upfronthosting.co.za>
In-reply-to
Content
Just to be clear, I'm still -1 on any of this.  On the one hand, there's a risk of backward-compatibility breakage (just as much a corner-case as the need expressed in this issue).  On the other hand, I'd actually push for _PyObject_LookupSpecial to be fixed to chain AttributeError coming from a descriptor into a TypeError.

Allowing instances to determine the capability of a class feels wrong and potentially broken.  Furthermore, doing so via AttributeError is problematic since it may mask an AttributeError that bubbles up (which is very confusing and hard to debug).  I've been bitten by this with pickle.

Still, it may be a good idea to expose _PyObject_LookupSpecial via the inspect module, but that should be addressed in a separate issue.
History
Date User Action Args
2015-04-19 22:10:25eric.snowsetrecipients: + eric.snow, rhettinger, terry.reedy, belopolsky, christian.heimes, ionelmc, steven.daprano, r.david.murray, Claudiu.Popa, ethan.furman, llllllllll, jedwards
2015-04-19 22:10:25eric.snowsetmessageid: <1429481425.17.0.10192639604.issue23990@psf.upfronthosting.co.za>
2015-04-19 22:10:25eric.snowlinkissue23990 messages
2015-04-19 22:10:25eric.snowcreate