wescpy at gmail.com
Wed Mar 19 05:26:02 CET 2008
> > You're mixing two completely different approaches of building a
> > property. If that code is actually in the book like that, that's a typo
> > that you should mention to the author.
> > :
> > The recipe you're referring to uses a magical function that returns a
> > dictionary of getter function, setter function, deleter function, and
> > docstring, with suitable key names so that the dictionary can be passed
> > as a keyword argument dictionary into the property() constructor.
> > However, that requires the magical foo=property(**foo()) invocation, not
> > the regular decorator invocation foo=property(foo).
> Ah, ok, I'll send him an email then, thanks for the explanation!
this well-known error was discovered pretty early... apologies to all
readers. please checkout the Errata at the book's website --
http://corepython.com -- and keep it as a companion in case you find
anything else like this. i appreciate all constructive feedback...
don't trust everything you read! send any other corrections to me at
corepython at yahoo... including suggestions for future editions,
ideas for exercises, new material that you think should be covered,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
More information about the Python-list