>>> import re
>>> p = re.compile('my pattern')
>>> print p
<_sre.SRE_Pattern object at 0x02274380>
>>>
>>> import re
>>> p = re.compile('my pattern')
>>> print p
<_sre.SRE_Pattern object at 0x02274380>
>>>
>>> sys.version
'2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]'
>>> dir(p)
['__copy__', '__deepcopy__', 'findall', 'finditer', 'match', 'scanner', 'search', 'split', 'sub', 'subn']
>>> p.pattern
'my pattern'