Message409745
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. |
|
Date |
User |
Action |
Args |
2022-01-05 09:56:44 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, maggyero |
2022-01-05 09:56:44 | serhiy.storchaka | set | messageid: <1641376604.81.0.59422554529.issue44024@roundup.psfhosted.org> |
2022-01-05 09:56:44 | serhiy.storchaka | link | issue44024 messages |
2022-01-05 09:56:44 | serhiy.storchaka | create | |
|