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.

Unsupported provider

classification
Title: re pattern objects have no __class__
Type: behavior Stage: resolved
Components: Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: michael.foord, python-dev
Priority: normal Keywords:

Created on 2011-05-17 23:07 by michael.foord, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg136193 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2011-05-17 23:07
>>> import re
>>> re.compile('foo')
<_sre.SRE_Pattern object at 0x1043230>
>>> p = re.compile('foo')
>>> p.__class__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: __class__

Already fixed in 3.2.
msg136196 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-05-17 23:30
New changeset c9df95b57af3 by Benjamin Peterson in branch '2.7':
stop using the old brain-dead interface for providing attributes/methods
http://hg.python.org/cpython/rev/c9df95b57af3
History
Date User Action Args
2022-04-11 14:57:17adminsetgithub: 56308
2011-05-17 23:30:19python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg136196

resolution: fixed
stage: test needed -> resolved
2011-05-17 23:07:07michael.foordcreate