"definitive" source on advanced python?

V

vdrab

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.
 
V

vdrab

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.
 
A

Alex Martelli

vdrab said:
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
 
K

Kent Johnson

vdrab said:
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
 
A

Alex Martelli

vdrab said:
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
 
P

pruebauno

vdrab said:
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.
 
R

Russ Salsbury

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,158
Latest member
Vinay_Kumar Nevatia
Top