473,471 Members | 1,696 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

"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
11 1632
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

49
by: Ville Vainio | last post by:
I don't know if you have seen this before, but here goes: http://text.userlinux.com/white_paper.html There is a jab at Python, though, mentioning that Ruby is more "refined". -- Ville...
9
by: P | last post by:
Hi, How would one get a list of encodings that can be passed to "".encode() I know base64,utf8,latin,ascii work and these are listed in the encodings and codecs modules, but where can one...
36
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but...
33
by: Jim Hill | last post by:
I've done some Googling around on this and it seems like creating a here document is a bit tricky with Python. Trivial via triple-quoted strings if there's no need for variable interpolation but...
6
by: Hostile17 | last post by:
What's considered to be the definitive version of a "good font settings" style sheet? That is, one which allows nearly all modern browsers, and Netscape 4, to get readable text. The basis of...
8
by: Hostile17 | last post by:
Consider the following HTML. ---------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <meta...
4
by: Dmitry | last post by:
Hello, Sometimes on js code execution Mozilla 1.5 prints in JS concole the following error: "Error: fn is not defined" where "fn" is the function name surely defined _before_ the line that...
5
by: Bob | last post by:
Are they different names for the same concept ?
2
by: Richard Maher | last post by:
Hi, Can someone please tell me the strategy(ies) used by Java (the Security Manager or whatever) to determine if a given IP address conforms to the definition of the codebase from which an...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.