Should proxy objects lie about their class name?
Robin Becker
robin at reportlab.com
Tue Nov 27 12:13:57 EST 2007
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, Integer)`` true.
> For more information see:
>
> http://www.python.org/dev/peps/pep-3119/
>
> STeVe
That will allow me to magically create instances which claim to be instances of
working_class even though they're actually instances of reactionary_class thus
turning all my modules into instances of class_war :)
--
Robin Becker
More information about the Python-list
mailing list