Paul McGuire wrote:
On Jun 5, 7:11 am, Tomohiro Kusumi <[EMAIL PROTECTED]>
wrote:
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?

It's already there in 2.6:

... class X (object):
...   def __init__ (self, a, b):
...     self.a = a
...     self.b = b
...   def __dir__ (self):
...     return ['a', 'b', 'c']
...
>>> dir (X (1, 2))
['a', 'b', 'c']
>>>

TJG
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to