"Steven D'Aprano" <[EMAIL PROTECTED]> writes:

> On Mon, 19 Mar 2007 19:48:37 +1100, Ben Finney wrote:
>
> > It's also best to inherit every class from another class, leading
> > to a single hierarchy for all classes and types. 'object' is the
> > one to choose if you don't want the behaviour of any other class.
>
> What's wrong with old-style classes?

    <URL:http://wiki.python.org/moin/NewClassVsClassicClass>

The main ones for me are:

  - super() doesn't work.

  - property() doesn't work as expected.

  - They will disappear in a future version of Python, and the docs
    recommend them for backward compatibility with existing code. This
    is reason enough to avoid writing classic classes in any new code.

    More importantly, it's a reason to educate all new programmers in
    using new-style classes and inheritance.

-- 
 \      "I don't know half of you half as well as I should like, and I |
  `\      like less than half of you half as well as you deserve."  -- |
_o__)                                                    Bilbo Baggins |
Ben Finney

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to