Issue 3247: dir of an "_sre.SRE_Match" object not working (original) (raw)
For Windows XP SP3:
v = 'add 1 to 4.56' import re r=re.search("([0-9]+)\D+(\d+.\d+)","add 1 to 4.56") r <_sre.SRE_Match object at 0x00BED920> r.groups() ('1', '4.56') dir(r) []
in pyhton 2.5 it shows: ['copy', 'deepcopy', 'end', 'expand', 'group', 'groupdict', 'gro ups', 'span', 'start']
Done in several changes: r64672 r64674 r64681.
Now the dir() is even more complete than before. I get: ['class', 'copy', 'deepcopy', 'delattr', 'doc', 'eq', 'format', 'ge', 'getattribute', 'gt', 'hash', 'init', 'le', 'lt', 'ne', 'new', 'reduce', 'reduce_ex', 'repr','setattr', 'sizeof', 'str', 'subclasshook', 'end', 'endpos', 'expand', 'group', 'groupdict', 'groups', 'lastgroup', 'lastindex', 'pos', 're', 'regs', 'span', 'start', 'string']