[docs] [issue9666] 'hasattr' fix to suppress only AttributeError

Yury Selivanov report at bugs.python.org
Tue Aug 24 04:56:13 CEST 2010

New submission from Yury Selivanov <yselivanov at gmail.com>:

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.

assignee: docs at python
components: Documentation, Library (Lib)
files: hasattr.patch
keywords: patch
messages: 114767
nosy: Yury.Selivanov, docs at python
priority: normal
severity: normal
status: open
title: 'hasattr' fix to suppress only AttributeError
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file18622/hasattr.patch

Python tracker <report at bugs.python.org>

More information about the docs mailing list