should I put old or new style classes in my book?

Matthieu Brucher matthieu.brucher at gmail.com
Thu May 29 12:21:19 EDT 2008


Hi,

New style classes should be put as the default. This is what I did, based on
the principle that new classes were introduces in Python 2.2 and that we are
now at 2.5 and soon 2.6.
Tutorials that use old style classes may be old and perhaps won't be updated
ever. That's not a problem. Just tell people that there are two styles, but
that new style classes are far more powerful and do what you think they
should do.

Matthieu

2008/5/29 <allendowney at gmail.com>:

> Hi All,
>
> I am working on a revised edition of How To Think Like a Computer
> Scientist,
> which is going to be called Think Python.  It will be published by
> Cambridge
> University Press, but there will still be a free version under the GNU
> FDL.
>
> You can see the latest version at thinkpython.com; I am revising now,
> so
> I welcome all comments, suggestions, corrections, etc.
>
> Anyway, I am posting to ask about the current status of new style
> classes.
> I am planning to present only one style in the book, because the
> differences
> between them don't matter for anything I am doing in the book.
>
> The current edition of the book presents old style classes.  I am
> considering
> switching to new style classes on the assumption that this should be
> the default
> choice for new programs.  The drawback is that a lot of the online
> documentation
> still uses old style classes.
>
> Thanks for any guidance you can provide.
>
> Cheers,
> Allen
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080529/4218db01/attachment-0001.html>


More information about the Python-list mailing list