[issue3247] dir of an "_sre.SRE_Match" object not working

2008-07-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: 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__', '

[issue3247] dir of an "_sre.SRE_Match" object not working

2008-07-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The cause is that this object use a custom tp_getattr slot, and use Py_FindMethod from there. and py3k removed the special "__methods__" lookup that allowed to lists these items. Of course, nowadays the way to add methods is not to put

[issue3247] dir of an "_sre.SRE_Match" object not working

2008-06-30 Thread vizcayno
New submission from vizcayno <[EMAIL PROTECTED]>: 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