467,895 Members | 1,418 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,895 developers. It's quick & easy.

"definitive" source on advanced python?

Hi all,

Is there some sort of coherent source (dead tree format, maybe?) on
some of the more advanced features
of python (decorators, metaclasses, etc)? I'm sort of looking for a
python book that actually gets to the good stuff at some point, without
first spending 6 chapters on how to append ints to a list. I can't seem
to find any.

I get the impression people just get by with scraps and code snippets
posted on blogs left and right. (hope I'm wrong and my google skills
just suck ...)

Thanks in advance,

stijn.

Apr 3 '06 #1
  • viewed: 1390
Share:
11 Replies
vdrab <st***********@gmail.com> wrote:
Hi all,

Is there some sort of coherent source (dead tree format, maybe?) on
some of the more advanced features
of python (decorators, metaclasses, etc)? I'm sort of looking for a
python book that actually gets to the good stuff at some point, without
first spending 6 chapters on how to append ints to a list. I can't seem
to find any.


"Python in a Nutshell" covers some advanced features (including both of
those you mention, in the 2nd edition due out in a few months) in
Chapter 5, but it may not be advanced enough for your desires (since, in
Chapter 4, it _does_ cover, inter alia, the list.append method).

I do not know of any book that ONLY cover exoterica and just assumes
that the reader has complete, thorough and correct understanding of all
the basics (some of which are subtler than most people think).

Many of my presentations, available at www.aleax.it in PDF form, do
focus strictly on some advanced subjects. However, you get just the PDF
form of the slides, not the way I normally present the materials (I do
not think any of my presentations has been filmed, yet).
Alex
Apr 3 '06 #2
Thank you.

The original question was not meant to sound particularly arrogant, and
as you point out
a book covering ONLY things like metaprogramming would probably be
pretty useless in its own way. I have been using python on and off for
about a year or so but still find myself staring at some of the funky
recipes at the aspn cookbook site, not knowing which way is up.
A good reference seems to be hard to come by, hence the question.
Thanks for the link, I will have a look at some of the material.

s.

Apr 3 '06 #3
I gave a course on advanced Python last year at the ACCU conference.
See
http://www.reportlab.org/~andy/accu2...rsofpython.zip

Michele Simionato

Apr 3 '06 #4
Maybe you're looking for something like this?
http://jamesthornton.com/eckel/TIPython/html/Index.htm

Haven't read it yet, but seems to be about design patterns. Not the
"definitive" stuff, though...

Apr 3 '06 #5
Gabriel de Dietrich wrote:
Maybe you're looking for something like this?
http://jamesthornton.com/eckel/TIPython/html/Index.htm

Haven't read it yet, but seems to be about design patterns. Not the
"definitive" stuff, though...


While TIP is an interesting book, it is more about implementation of
standard design patterns in Python than about 'advanced' Python
programming.

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Apr 3 '06 #6
vdrab wrote:
Hi all,

Is there some sort of coherent source (dead tree format, maybe?) on
some of the more advanced features
of python (decorators, metaclasses, etc)? I'm sort of looking for a
python book that actually gets to the good stuff at some point, without
first spending 6 chapters on how to append ints to a list. I can't seem
to find any.


The "What's New" documents that come with each version of Python do a
good job of introducing new features, with reference to the relevant PEP
for all the details. For example decorators:
http://docs.python.org/whatsnew/node6.html

I found the printed Python Cookbook to be a good way to learn about
idiomatic usage. It also has some recipes using advanced features and
the explanations are helpful.

Kent
Apr 3 '06 #7
vdrab <st***********@gmail.com> wrote:
Thank you.

The original question was not meant to sound particularly arrogant, and
as you point out
a book covering ONLY things like metaprogramming would probably be
pretty useless in its own way.
There's a niche market for such books -- "Putting Metaclasses to Work",
for example, an out-of-print book that's about a funky dialect of C++,
did influence the design of Python's new object model, since Guido read
it at just the right time. But, the book IS out of print and the
language it describes is dead, which are cautionary signs;-).
I have been using python on and off for
about a year or so but still find myself staring at some of the funky
recipes at the aspn cookbook site, not knowing which way is up.
A good reference seems to be hard to come by, hence the question.
Thanks for the link, I will have a look at some of the material.


You're welcome! Besides the 2nd edition of the Nutshell, for which you
should not hold your breath (it's months away yet), and the
presentations on my site, there's a fair amount of material in the 2nd
edition of the printed Cookbook -- we put a immense amount of work into
selecting, discussing, explaining, *and* shoring up the recipes
presented there, most particularly the "black magic" ones (look
especially for the two chapters whose introductions Raymond Hettinger
wrote, both the introductions and contents are quite instructive). But,
the Cookbook is mostly about examples/uses of language and library
feaures, not a *reference* to them.
Alex
Apr 3 '06 #8
vdrab wrote:
Hi all,

Is there some sort of coherent source (dead tree format, maybe?) on
some of the more advanced features
of python (decorators, metaclasses, etc)? I'm sort of looking for a


If you just want a good book in feature description I recomend Python
in a Nutshell. It will explain everything you ever did (or didn't) want
to know without much fuzz. It will not have a long list of when you
should use them. For the later the Python Cookbook is probably more
appropiate. It is the book with the most amount and kind of advanced
stuff IMHO. The printed version is much better than the online because
it not only contains the examples but explains how they work. The
problem is that the cookbook is organized by problem domain and not by
implementation technique. To learn techniques you have to read it like
the Bible: you read the stories and try to deduce what it tells you
about Python.

Apr 6 '06 #9

pr*******@latinmail.com wrote:
vdrab wrote:
Hi all,

Is there some sort of coherent source (dead tree format, maybe?) on
some of the more advanced features
of python (decorators, metaclasses, etc)? I'm sort of looking for a


If you just want a good book in feature description I recomend Python
in a Nutshell. It will explain everything you ever did (or didn't) want
to know without much fuzz. It will not have a long list of when you
should use them. For the later the Python Cookbook is probably more
appropiate. It is the book with the most amount and kind of advanced
stuff IMHO. The printed version is much better than the online because
it not only contains the examples but explains how they work. The
problem is that the cookbook is organized by problem domain and not by
implementation technique. To learn techniques you have to read it like
the Bible: you read the stories and try to deduce what it tells you
about Python.


The Python Cookbook is the word of God as told to the Prophet.

I can light a candle to that.

-- Russ

Apr 6 '06 #10
You might find http://www.cafepy.com/article/python_types_and_objects/
and http://www.cafepy.com/article/python...s_and_methods/
useful. These articles assume you know Python, and describe some of the
mechanisms behind Python new-style objects - including descriptors (but
not decorators).

Apr 10 '06 #11
wow, this looks nice.
thanks a lot.

Apr 10 '06 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by P | last post: by
36 posts views Thread by Andrea Griffini | last post: by
33 posts views Thread by Jim Hill | last post: by
6 posts views Thread by Hostile17 | last post: by
2 posts views Thread by Richard Maher | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.