Should proxy objects lie about their class name?

John J. Lee jjl at pobox.com
Tue Nov 20 21:50:37 CET 2007


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 existing
doctests.

Thanks in advance for your views


John



More information about the Python-list mailing list