[Python-bugs-list] [ python-Bugs-740026 ] re.finditer() listed as new in 2.2.?

SourceForge.net noreply@sourceforge.net
Tue, 10 Jun 2003 17:29:32 -0700


Bugs item #740026, was opened at 2003-05-19 11:52
Message generated for change (Comment added) made by bcannon
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: Brett Cannon (bcannon)
Date: 2003-06-10 17:29

Message:
Logged In: YES 
user_id=357491

re is the front-end for sre so it shouldn't be documented 
specifically.  I also don't know of a single instance of where 
something is documented in the standard lib with a revision 
number and I doubt we will start now.

Since the docs are correct for the most recent version of the 2.2 
branch (you can check what version the docs apply to at the 
bottom of every page) I am inclined to say this bug should be 
closed.  Any objections?

----------------------------------------------------------------------

Comment By: Grzegorz Adam Hankiewicz (gradha)
Date: 2003-06-06 10:41

Message:
Logged In: YES 
user_id=153159

Maybe SRE should make it to the final documentation.

----------------------------------------------------------------------

Comment By: Raymond Hettinger (rhettinger)
Date: 2003-05-19 22: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 18: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