Eric Snow added the comment: 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23990> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com