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.

classification
Title: 'hasattr' fix to suppress only AttributeError
Type: behavior Stage:
Components: Documentation, Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: benjamin.peterson Nosy List: Yury.Selivanov, benjamin.peterson, docs@python, jcea
Priority: normal Keywords: gsoc

Created on 2010-08-24 02:56 by Yury.Selivanov, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
hasattr.patch Yury.Selivanov, 2010-08-24 02:56
Messages (2)
msg114767 - (view) Author: Yury Selivanov (Yury.Selivanov) * Date: 2010-08-24 02:56
As discussed on python-dev mailing list (http://mail.python.org/pipermail/python-dev/2010-August/103178.html), 'hasattr' default behaviour should be changed to suppress only AttributeError exceptions.  Other should pass through.

The fix, however, shouldn't change behaviour of existing C API, functions PyObject_HasAttr and PyObject_HasAttrString in particular.

I'm targeting this issue on Python 3.2 version, but probably it may be introduced in the next Python 3.1 maintenance release.
msg114768 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2010-08-24 03:27
Fixed in r84294. I will not backport to 3.1. Thanks for the contribution!
History
Date User Action Args
2022-04-11 14:57:05adminsetgithub: 53875
2010-09-28 17:15:20jceasetnosy: + jcea
2010-08-24 03:27:52benjamin.petersonsetstatus: open -> closed
keywords: + gsoc, - patch
resolution: accepted
messages: + msg114768
2010-08-24 03:07:34benjamin.petersonsetassignee: docs@python -> benjamin.peterson

nosy: + benjamin.peterson
2010-08-24 02:56:06Yury.Selivanovcreate