Question regarding re module
Tobiah
toby at tobiah.org
Thu Jun 5 15:24:55 EDT 2008
>> > It could be that the result overloads the __getattr__-method to delegate
>> > calls to some object. Thus it's not part of the outer instance.
>>
>
> Didn't I read that Py3 will support a __dir__ method so that classes
> *could* report such pseudo-attributes in response to dir?
>
> -- Paul
I don't believe that it possibly could:
class foo(object):
def __getattr__(self, what):
if what[0] == 't':
return True
f = foo()
print f.toby
** Posted from http://www.teranews.com **
More information about the Python-list
mailing list