New inited instance of class?

Aahz aahz at pythoncraft.com
Sun Dec 7 09:04:51 EST 2003


In article <vt5b8npantkt35 at corp.supernews.com>,
Francis Avila <francisgavila at yahoo.com> wrote:
>
>If you're curious, look in the Python Language Reference at the old
>and new style classes to see the differences.  There's absolutely no
>advantage to old style classes, so stop usin' 'em.

<raised eyebrow>  In addition to the factors Fredrik mentioned, there's
also the issue that new-style classes are more of a moving target WRT
syntax and semantics; for complex uses, it can be tricky (or impossible)
to get the same code working the same way on both 2.2 and 2.3.

More than that, you *can't* use new-style classes for exceptions.  So
please stop telling people to avoid classic classes.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Weinberg's Second Law: If builders built buildings the way programmers wrote 
programs, then the first woodpecker that came along would destroy civilization.




More information about the Python-list mailing list