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 serhiy.storchaka
Recipients maggyero, serhiy.storchaka
Date 2022-01-05.09:56:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641376604.81.0.59422554529.issue44024@roundup.psfhosted.org>
In-reply-to
Content
Good point. That code was originally added in issue420304 because every exception raised in PyObject_GetAttr() (including a TypeError for non-string name) was silenced in hasattr() and 3-argument getattr(). It was changed in Python 3, so this code duplication is no longer needed.

The name of the function was added in error messages in a9b9c9fa9fe9d1ae74ba9f89c43557a7f9bc04f5. Now it will gone. It is a minor regression, but I think that it is fine. Not all error messages contain a function name. In this case the context is clear from the traceback, and the error is not specific to these two functions, setattr() and delattr() raise the same error.
History
Date User Action Args
2022-01-05 09:56:44serhiy.storchakasetrecipients: + serhiy.storchaka, maggyero
2022-01-05 09:56:44serhiy.storchakasetmessageid: <1641376604.81.0.59422554529.issue44024@roundup.psfhosted.org>
2022-01-05 09:56:44serhiy.storchakalinkissue44024 messages
2022-01-05 09:56:44serhiy.storchakacreate