[Python-bugs-list] [ python-Bugs-740026 ] re.finditer() listed as new in 2.2.?
SourceForge.net
noreply@sourceforge.net
Mon, 19 May 2003 22:19:06 -0700
Bugs item #740026, was opened at 2003-05-19 13:52
Message generated for change (Comment added) made by rhettinger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=740026&group_id=5470
Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Grzegorz Adam Hankiewicz (gradha)
Assigned to: Nobody/Anonymous (nobody)
Summary: re.finditer() listed as new in 2.2.?
Initial Comment:
Documentation says re.finditer() is new in 2.2
(http://www.python.org/doc/current/lib/node99.html),
but this is not totally correct:
[gradha@ws5:0] [~/cms_freeze]$ python
Python 2.2.1 (#1, Sep 10 2002, 17:49:17)
[GCC 3.2] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> import re
>>> re.finditer
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'finditer'
[0:arpa/g/gradha> /usr/pkg/bin/python2.2
Python 2.2.2 (#1, Mar 13 2003, 22:53:11)
[GCC 2.95.3 20010315 (release) (NetBSD nb3)] on netbsd1
Type "help", "copyright", "credits" or "license" for
more information.
>>> import re
>>> re.finditer
<function finditer at 0x1201ed218>
The first log was produced on an 8.1 Suse default
distro. For a moment I wanted to blame Suse, but I
thought: "hey, let's blame the documentation!". Please
extend that version number to 2.2.2.
----------------------------------------------------------------------
>Comment By: Raymond Hettinger (rhettinger)
Date: 2003-05-20 00:19
Message:
Logged In: YES
user_id=80475
I recommend leaving it listed as new in 2.2 since that it the
first time that "from sre import *" would find it.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2003-05-19 20:37
Message:
Logged In: YES
user_id=33168
This is a bit of a weird case. From looking through CVS,
finditer is in sre, but due to a bug it was not exported
from re. So import sre ; sre.finditer should work, but
from sre import * doesn't. I'm not sure how best to handle
this.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=740026&group_id=5470