[Python-bugs-list] [ python-Bugs-407379 ] SRE objects of no known type
nobody
nobody@sourceforge.net
Fri, 09 Mar 2001 17:55:51 -0800
Bugs #407379, was updated on 2001-03-09 11:43
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=407379&group_id=5470
Category: Extension Modules
Group: Not a Bug
Status: Closed
Priority: 5
Submitted By: Joshua Macy
Assigned to: Fred L. Drake, Jr.
Summary: SRE objects of no known type
Initial Comment:
The new SRE re module doesn't seem to create pattern
types of any type known to types.
Python 2.1b1 (#11, Mar 2 2001, 11:23:29) [MSC 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license" for more
information.
>>> import re
>>> r = re.compile('abc')
>>> type(r)
<type 'SRE_Pattern'>
>>> import types
>>> isinstance(r, types.InstanceType)
0
Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit
(Intel)] on win3
Copyright 1991-1995 Stichting Mathematisch Centrum,
Amsterdam
>>> import re
>>> r = re.compile('abc')
>>> type(r)
<type 'instance'>
>>> import types
>>> isinstance(r, types.InstanceType)
1
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr.
Date: 2001-03-09 17:55
Message:
Logged In: YES
user_id=3066
SRE creates pattern objects that are of an extension type rather than an instance, so there is no entry for them in the types module.
Why do you think this is a bug? The specific type of these objects should be irrelevant. I'm classifying this as "Not a bug".
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=407379&group_id=5470