[Tutor] Regular Expresions instances

Emilio Casbas ecasbasj at yahoo.es
Wed Apr 29 00:51:09 CEST 2009


Hi,

following the example from
http://docs.python.org/3.0/howto/regex.html

If I execute the following code on the python shell (3.1a1):

>>> import re
>>> p = re.compile('ab*')
>>> p

I get the msg:
<_sre.SRE_Pattern object at 0x013A3440>

instead of the msg from the example:
<re.RegexObject instance at 80b4150>

Why I get an SRE_Patterns object instead of a RegexObject instance?

Regards
Emilio



      


More information about the Tutor mailing list