Type emulation issues with new style classes

Michael Hudson mwh at python.net
Sat Feb 28 12:22:07 EST 2004


"Chris" <feb04.20.netman at spamgourmet.com> writes:

> Is there any way to make the class Z behave the same way as class Y?

You need a custom metaclass for Z, and implement __getattr__ there.

HTH.

Cheers,
mwh

-- 
  Lisp does badly because we refuse to lie.  When people ask us if 
  we can solve insoluble problems we say that we can't, and because 
  they expect us to lie to them, they find some other language
  where the truth is less respected.   -- Tim Bradshaw, comp.lang.lisp



More information about the Python-list mailing list