Re: Should proxy objects lie about their class name?

2007-11-27 Thread Fuzzyman
On Nov 26, 11:56 pm, Carl Banks [EMAIL PROTECTED] wrote: On Nov 20, 3:50 pm, [EMAIL PROTECTED] (John J. Lee) wrote: Not much to add to the subject line. I mean something like this: ProxyClass.__name__ = ProxiedClass.__name__ I've been told that this is common practice. Is it? Would

Re: Should proxy objects lie about their class name?

2007-11-27 Thread Steven Bethard
Fuzzyman wrote: On Nov 26, 11:56 pm, Carl Banks [EMAIL PROTECTED] wrote: On Nov 20, 3:50 pm, [EMAIL PROTECTED] (John J. Lee) wrote: Not much to add to the subject line. I mean something like this: ProxyClass.__name__ = ProxiedClass.__name__ I've been told that this is common practice. Is

Re: Should proxy objects lie about their class name?

2007-11-27 Thread Robin Becker
Steven Bethard wrote: ... The Python 3 machinery allows *other* classes to lie about whether or not your object is an instance or subclass of them, without requiring them to set your __class__ or __bases__. So, for example, you can create a class ``Integer`` and make ``issubclass(int,

Re: Should proxy objects lie about their class name?

2007-11-27 Thread John J. Lee
Diez B. Roggisch [EMAIL PROTECTED] writes: John J. Lee schrieb: [EMAIL PROTECTED] (John J. Lee) writes: Not much to add to the subject line. I mean something like this: ProxyClass.__name__ = ProxiedClass.__name__ I've been told that this is common practice. Is it? Would this surprise

Re: Should proxy objects lie about their class name?

2007-11-26 Thread John J. Lee
[EMAIL PROTECTED] (John J. Lee) writes: Not much to add to the subject line. I mean something like this: ProxyClass.__name__ = ProxiedClass.__name__ I've been told that this is common practice. Is it? Would this surprise you if you ran into it in a debugging session? Does nobody have

Re: Should proxy objects lie about their class name?

2007-11-26 Thread Diez B. Roggisch
John J. Lee schrieb: [EMAIL PROTECTED] (John J. Lee) writes: Not much to add to the subject line. I mean something like this: ProxyClass.__name__ = ProxiedClass.__name__ I've been told that this is common practice. Is it? Would this surprise you if you ran into it in a debugging

Re: Should proxy objects lie about their class name?

2007-11-26 Thread Carl Banks
On Nov 20, 3:50 pm, [EMAIL PROTECTED] (John J. Lee) wrote: Not much to add to the subject line. I mean something like this: ProxyClass.__name__ = ProxiedClass.__name__ I've been told that this is common practice. Is it? Would this surprise you if you ran into it in a debugging session?

Should proxy objects lie about their class name?

2007-11-20 Thread John J. Lee
Not much to add to the subject line. I mean something like this: ProxyClass.__name__ = ProxiedClass.__name__ I've been told that this is common practice. Is it? Would this surprise you if you ran into it in a debugging session? One very real advantage that I can see is avoiding breaking