re documentation bug?

T

Tycho Andersen

Consider the following session:

Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: sub() got an unexpected keyword argument 'flags'

The flags should really be passed to re.compile() instead. However,
the documentation indicates that they can be passed to re.sub() as
well. Is this a bug, or am I reading things wrong?

http://docs.python.org/library/re.html#re.sub

TIA!

\t
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top