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

Amaury Forgeot d'Arc report at bugs.python.org
Wed Jul 2 22:43:51 CEST 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> 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 them in
tp_getattr, but in a tp_methods slot.

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3247>
_______________________________________


More information about the Python-bugs-list mailing list