473,785 Members | 2,249 Online
Bytes | Software Development & Data Engineering Community
+ 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 1682
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*******@latin mail.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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

49
2874
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 Vainio http://www.students.tut.fi/~vainio24
9
1695
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 get a definitive list?
36
6404
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 something I'll need in this case is some experience-based set of rules about how to use python in this context. For example... is defining readonly attributes in classes worth the hassle ? Does duck-typing scale well in complex
33
9178
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 requiring a long, long formatted arglist via (%s,%s,%s,ad infinitum) if there is. So my question is: Is there a way to produce a very long multiline string of output with variables' values inserted without having to resort to this wacky """v...
6
2737
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 this is at http://www.alistapart.com/stories/sizematters/ -- the column "Size Matters" by Todd Fahrner. The concept, as I understand it, is set Netscape 4 fonts to specific
8
5747
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 http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <title>Untitled</title>
4
6452
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 produces error. The fn body and error line both live in the same *.js file.
5
3696
by: Bob | last post by:
Are they different names for the same concept ?
2
2648
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 applet was retrieved? For example, if an Applet was loaded from mycluster.mydomain.com, and "mycluster" was a cluster alias that was using DNS load-balancing (or round-robin or a.n.other distribution technique) to distribute client connections among...
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10356
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10098
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9958
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8986
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5523
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3662
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2890
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.