Changing the repr() of a class?

Steve Holden sholden at holdenweb.com
Fri Apr 19 07:57:06 EDT 2002


"Laura Creighton" <lac at strakt.com> wrote in message
news:mailman.1019212237.13240.python-list at python.org...
> > Thanks Alex and thanks to all who discussed my problem. I am honoured to
> > participate in such a group.
> >
> > The 'Alex solution' worked but it does lead on to another problem -
> > Reference material!
> >
> > I bought 'Learning Python' by Mark Lutz, First Edition. Read it when I
> > bought it a couple of years back, but I usually get by with the online
> > documentation that comes with python.
> >
> > With all the changes in Python since then I need a new reference work.
Would
> > anyone recommend a  book that includes info on metaclasses?
> >
Unfortunately the [book] publishing world has a problem tracking
developments that are so recent. For metaclasses and the like, added to the
language in 2.2 as part of the effort towards type/classunification, you
will have to wait a while - probably at least another three to six months
before anything as recent as this is covered.

I know from my own experiences writing "Python Web Programming" that no
matter how hard you try it's very difficult to be completely up-to-date. I
*did*, thanks to Andrew Kuchling, manage to include an appendix covering 2.1
and 2.2, but you can get the complete version of his material on the web at

    http://www.amk.ca/python/2.2

It also includes some useful references to other web sources, the
authoritative source for metaclasses (if there is one) being

    http://www.python.org/peps/pep-0253.html

>
> If you are willing to wait, Alex's own Python in a Nutshell will be
> published by O'Reilly soon.  In this particular case, I think the
> Nut is more of a coconut than a pistachio nut :-).  Its not PP2E sized,
and
> no doubt Alex will complain about all the wonderful things he had
> to _cut_, but nonetheless ...
>
I'm sure Alex's book is going to be an excellent contribution to the
language and its growth. While I was disappointed that it had to line up
behind "The Python Cookbook", it will probably be better for the wait. (I
can imagine Alex gnashing his teeth whenever new features requiring changes
are introduced, though. When you are writing, sometimes you just want to
shout "Stop!" at the developers ;-)

regards
 Steve
--
home: http://www.holdenweb.com/    book: http://pydish.holdenweb.com/pwp/







More information about the Python-list mailing list