Thomas Rast wrote:
I've found out about a fundamental problem of attribute lookup, the
hard way... Is there anything that can be done about this?
It seems to me that the main problem is you're raising an AttributeError
when an attribute is private. AttributeError is only raised when an
attribute
David M. Cooke wrote:
Ideally, I think the better way is if getattr, when raising
AttributeError, somehow reused the old traceback (which would point
out the original problem). I don't know how to do that, though.
Maybe a solution could be to put the attribute name in the
AttributeError exception
[EMAIL PROTECTED] (Aahz) writes:
> In article <[EMAIL PROTECTED]>,
> Thomas Rast <[EMAIL PROTECTED]> wrote:
>>
>>class dispatcher:
>># ...
>>def __getattr__(self, attr):
>>return getattr(self.socket, attr)
>>
> import asyncore
> class Peer(asyncore.dispatcher):
>>... d
In article <[EMAIL PROTECTED]>,
Thomas Rast <[EMAIL PROTECTED]> wrote:
>
>I've found out about a fundamental problem of attribute lookup, the
>hard way.
Maybe.
>asyncore.py uses the following code:
>
>class dispatcher:
># ...
>def __getattr__(self, attr):
>return getattr(self.soc
Hello
I've found out about a fundamental problem of attribute lookup, the
hard way.
asyncore.py uses the following code:
class dispatcher:
# ...
def __getattr__(self, attr):
return getattr(self.socket, attr)
Now suppose that I'm asking for some attribute not provided by
dispatch