Python Essential Reference 4th Ed.
stoolpigeon writes "It has been ten years since David Beazley wrote the first edition of Python Essential Reference. The book has proven itself as a valuable resource to Python developers and has been kept current over those ten years, with the fourth edition coming at an interesting time for Python. Python 3 was a major release that broke backwards compatibility. Python 3 has been around for a year now. That said, the current download page at the official Python site states, 'If you don't know which version to use, start with Python 2.6.4; more existing third party software is compatible with Python 2 than Python 3 right now.' Beazley, in keeping with the pragmatic roots of a reference that sticks to what is 'essential,' has removed the coverage on features from 2 that were removed from 3. At the same time, the primary focus for new features that came with 3 is limited to those that have been back-ported to 2. This approach, born out of a desire to keep the reference relevant, provides a blended approach that is above all else practical." Read on for the rest of JR's review.
Python Essential Reference 4th Ed.
author
David M. Beazley
pages
738
publisher
Addison-Wesley
rating
9/10
reviewer
JR Peck
ISBN
978-0-672-32978-4
summary
A definitive guide to the core Python language and the essential parts of the Python library.
The end result of that choice is a reference document consisting of those parts of Python that are shared between versions 2 and 3. This is a significant portion of the language and I think this approach is really what will give this reference more traction than many of the other guides that focus purely on 3. I think that those are valuable and over time the balance will shift but as of right now, for a little while to come, this book takes the most realistic approach. That feels very fuzzy, but I have no idea how long it will be until Python 3 truly is the dominant version and Python 2 is truly put to bed.
If I had to guess how Beazley's Python Essential Reference has held in there over the years, the key would be that there is a lot of what a developer needs and very little of what she doesn't need. There is a twenty-four page tutorial introduction, but this is not a guide on how to program or how to use Python for beginners. An experienced programmer could probably use this reference to shift to Python as a new language, but someone completely new to writing code would probably not want to start here. A quick look at the table of contents shows that an explanation of the language itself is covered in under 200 pages. Extending and embedding Python also get their own section, but close to 400 pages is given to the Python library.
An inevitable question is what one will gain with this reference over the online documentation. A good example to see how things vary is to look at chapter nineteen, Operating System Services and the online documentation for Generic Operating System Services. The online documentation is very thorough, and covers each piece of the library starting with os and io, building from there. While every facet is documented much of it is rather brief. For example section 16.2.3. Raw File I/O is a very straightforward listing of the very low level functionality available via io.FileIO. In contrast, looking at the 3.1.1 Docs for Raw IO shows that parameters for FileIO changed with that version. Looking to the documentation for 2.7a1 Raw File I/O shows that these changes are being back-ported to Python 2.
In Python Essential Reference none of this hunting down changes and checking to see if they are coming to 2 are necessary. Beazley shows them in his documentation. This is the strength of his choice on how to handle these types of situations. On top of that, Beazley provides more than the online documents by including four paragraphs of additional information on Raw I/O and when its use is appropriate. This added content is probably available googling around for it, but then I have to take the time to check dates on posts to see if things are still current and in general just hope that things are accurate. I have never read a technical book that was completely error free, and there are probably at the very least some typos in Python Essential Reference, though I haven't caught any of them on my read through or use of the book yet. But the important thing is that I don't expect the book to be perfect, rather I value it for being a known quantity. I am aware of just when the material was compiled, who put it together and I have it all in one place.errno symbols is not exhaustive and oddly enough is not ordered alphabetically. Beazley provides two lists for errno symbols. They are provided in alphabetical order, have a description and are grouped as POSIX error codes and Windows error codes. A quick glance at these tables in a skimming of the book might lead one to believe that this is just a simple quick grab from already available sources, but that isn't the case. There is real value added even here.
The index is solid. It would seem that one should be able to take this for granted with a technical reference but I've seen some sad exceptions. Between the thorough index and the detailed table of contents I've never had to spend more than a few seconds looking for what I need. This is the result of those tools as well as the fact that this is not an exhaustive reference. After initially reading through the book for this review, I've taken some time just to use it day to day, as I doubt many will be reading it from front to back. I don't use Python professionally. I'm purely a hobbyist when it comes to programming, but I've found that if I want to get the most out of the time I do have to play with personal projects, I want this book close. I'm not cranking out code that fast to begin with and so I need all the help I can get. I've found that Beazley seems to have hit that sweet spot where he gives enough information to get me where I need to be without bogging down in too many details or the things that I just don't need to know. I imagine this proper balance of information is due to Beazley's extensive experience with Python and that of Noah Gift the technical editor for the book.
I've mentioned repeatedly that I approve of how the shift between Python 2 and 3 has been handled. Beazley hasn't completely integrated everything and left some of the unique new features of 3 out in the cold. There is an appendix that deals specifically with Python 3. It is short but does have some value. New features, common pitfalls for those making the move from 2 to 3 and how to run both at the same time in a single environment are covered. This is helpful and keeps my desk a little neater, though I think if I were going to be spending extensive time working with Python 3 then I would probably want to have another reference on hand.
If you are a week-end hacker like me, or someone that is writing Python on the clock, I think that this compact reference is very useful. I don't have any trouble running across huge technical books that do come in handy for any project that requires something heavy. I also see a lot of little books that seem to be quickly produced summaries of what is already out there, spending most of their short content on fluff. Every so often though, someone hits that sweet spot of concise usefulness. Beazley did this with Python Essential Reference and this new edition continues that history in strong fashion.
You can purchase Python Essential Reference 4th Ed. from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
If I had to guess how Beazley's Python Essential Reference has held in there over the years, the key would be that there is a lot of what a developer needs and very little of what she doesn't need. There is a twenty-four page tutorial introduction, but this is not a guide on how to program or how to use Python for beginners. An experienced programmer could probably use this reference to shift to Python as a new language, but someone completely new to writing code would probably not want to start here. A quick look at the table of contents shows that an explanation of the language itself is covered in under 200 pages. Extending and embedding Python also get their own section, but close to 400 pages is given to the Python library.
An inevitable question is what one will gain with this reference over the online documentation. A good example to see how things vary is to look at chapter nineteen, Operating System Services and the online documentation for Generic Operating System Services. The online documentation is very thorough, and covers each piece of the library starting with os and io, building from there. While every facet is documented much of it is rather brief. For example section 16.2.3. Raw File I/O is a very straightforward listing of the very low level functionality available via io.FileIO. In contrast, looking at the 3.1.1 Docs for Raw IO shows that parameters for FileIO changed with that version. Looking to the documentation for 2.7a1 Raw File I/O shows that these changes are being back-ported to Python 2.
In Python Essential Reference none of this hunting down changes and checking to see if they are coming to 2 are necessary. Beazley shows them in his documentation. This is the strength of his choice on how to handle these types of situations. On top of that, Beazley provides more than the online documents by including four paragraphs of additional information on Raw I/O and when its use is appropriate. This added content is probably available googling around for it, but then I have to take the time to check dates on posts to see if things are still current and in general just hope that things are accurate. I have never read a technical book that was completely error free, and there are probably at the very least some typos in Python Essential Reference, though I haven't caught any of them on my read through or use of the book yet. But the important thing is that I don't expect the book to be perfect, rather I value it for being a known quantity. I am aware of just when the material was compiled, who put it together and I have it all in one place.errno symbols is not exhaustive and oddly enough is not ordered alphabetically. Beazley provides two lists for errno symbols. They are provided in alphabetical order, have a description and are grouped as POSIX error codes and Windows error codes. A quick glance at these tables in a skimming of the book might lead one to believe that this is just a simple quick grab from already available sources, but that isn't the case. There is real value added even here.
The index is solid. It would seem that one should be able to take this for granted with a technical reference but I've seen some sad exceptions. Between the thorough index and the detailed table of contents I've never had to spend more than a few seconds looking for what I need. This is the result of those tools as well as the fact that this is not an exhaustive reference. After initially reading through the book for this review, I've taken some time just to use it day to day, as I doubt many will be reading it from front to back. I don't use Python professionally. I'm purely a hobbyist when it comes to programming, but I've found that if I want to get the most out of the time I do have to play with personal projects, I want this book close. I'm not cranking out code that fast to begin with and so I need all the help I can get. I've found that Beazley seems to have hit that sweet spot where he gives enough information to get me where I need to be without bogging down in too many details or the things that I just don't need to know. I imagine this proper balance of information is due to Beazley's extensive experience with Python and that of Noah Gift the technical editor for the book.
I've mentioned repeatedly that I approve of how the shift between Python 2 and 3 has been handled. Beazley hasn't completely integrated everything and left some of the unique new features of 3 out in the cold. There is an appendix that deals specifically with Python 3. It is short but does have some value. New features, common pitfalls for those making the move from 2 to 3 and how to run both at the same time in a single environment are covered. This is helpful and keeps my desk a little neater, though I think if I were going to be spending extensive time working with Python 3 then I would probably want to have another reference on hand.
If you are a week-end hacker like me, or someone that is writing Python on the clock, I think that this compact reference is very useful. I don't have any trouble running across huge technical books that do come in handy for any project that requires something heavy. I also see a lot of little books that seem to be quickly produced summaries of what is already out there, spending most of their short content on fluff. Every so often though, someone hits that sweet spot of concise usefulness. Beazley did this with Python Essential Reference and this new edition continues that history in strong fashion.
You can purchase Python Essential Reference 4th Ed. from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
The index is solid. It would seem that one should be able to take this for granted with a technical reference but I've seen some sad exceptions.
I think that Beazley generated the index himself with a Python script. I took an employer-sponsored class from him recently, and he was particularly proud of the new book's index.
"If I had to guess how Beazley's Python Essential Reference has held in there over the years, the key would be that there is a lot of what a developer needs and very little of what she doesn't need."
I know it's considered fashionable to worship at the altar of political correctness, but for grammatical correctness, one should always use a masculine pronoun when the gender is mixed or unknown. Also, the last occurrence of the word "need" is redundant.
O'Reilly's Nutshell series have become rather inconsistent. Java series particularly I found useless waste of tree, but the Python one by Martelli was very good, complements the online doc very well.
Would be good to compare this title with Martelli's.
Fuck systemd. Fuck Redhat. Fuck Soylent, too. Wait, scratch the last one.
Why should one use a masculine pronoun? I understand that it's the historically normal usage, but that implies nothing about what we should do. The writer's meaning is clear. What other consideration is relevant?
Anyone who loves or hates any language, platform, or manufacturer, doesn't know what they're talking about.
I had this on Safari Books Online for awhile and I finding myself enjoying it so I opted for a real copy which should show up tomorrow.
I would definitely say it's one of the best reference books I've seen in awhile.
Code books in general seem to be lacking these days. Often they cut out the code and just chuck it on a disk. The reason I bought the book is because I want to see the code on paper and importantly right beside the relevant text that I'm reading.
In my opinion the Python Essential Reference has a decent balance between examples and the author speaking and it was only £18 which, imo isn't that bad.
... all PHP coders are secretly py-curious.
Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
It would be far better to create and use a new and actually gender-neutral third-person singular pronoun...
Good luck with that. Pronouns are an example what linguists refer to as grammatical (as opposed to lexical) categories. One way in which grammatical classes are different from lexical categories is that they are generally a "closed" class, meaning they do not readily admit new members. You can make up new nouns, verbs, and adjectives (lexical categories) at will, but if you try to invent, for example, a new preposition (a grammatical category), it probably won't catch on (and you'll sound funny, if not unintelligible). And since pronouns are also a grammatical class, you guessed it: same thing. Of course, grammatical classes do change, but it's normally at a significantly slower rate.
Additionally, many people already have this base covered with "they"--while Standard English hasn't (yet?) accepted it, it's certainly a part of the (actual) English of many speakers.
R.Mo
What's going on here?
I clicked on this topic because I wanted to read multiple long flamewars about indentation, whitespace and programming syntax. But no: Instead, all I see is a bunch of arguments about pronoun gender.
I generally refer to code monkeys as 'it'.
As in 'Look it has messed up that trivial bit of Python as well'.
Donning my asbestos underpants.
Putting on my linguist's hat here (yes, I do have a degree in it, thanks), languages don't have pathologies. They have grammars, and those grammars have rules. Rules which tend to change over time and often to be inconsistent between dialects (cf., Old English Vs. modern standard British English, and modern standard British English Vs. modern standard US English), but at any given point in time, the grammar rules intrinsically known by native speakers are a very good guide as to what is correct or not correct in a language.
The current English rule is that "he" is the generic personal pronoun. A drift to "they" may be occurring (or it may be a fad; too early to tell) and using "she" has a certain amount of traction in some quarters and the language may change such that whether to use "he" or "she" is at the discretion of the speaker, with either being correct. However, as it currently stands, usages other than "he" in a context that is not exclusively female (one I frequently encounter myself, since all of my children are girls) is formally incorrect.
As others have noted, the use of "he" for a group that is not exclusively female is just as sexist (or not) as the use of "he" is for a group that is not exclusively male. Claiming that the use of "he" as the generic instead of "she" is sexist only reveals your own bias.
As I'm sure everyone knows Python is named after Monty Python so in a way it does.
No, it's a good choice.
It's one of the many sexist pathologies of English that the male third person pronoun is used to indicate a generic third person. Using a female third person pronoun in a place where the context is obviously gender neutral highlights that pathology without sacrificing any meaning.
That it pisses you off indicates only that the pathology exists. This technique has existed for more than a decade in the humanities, and once you get used to it, it's as unnoticeable as 'he/him'--in other words, once that pathology has been exposed and turned off.
This is a far better way to remove a bit of useless baggage from the language than haranguing people to be PC or accusing them of being sexist. It just moves on to a better usage, and if that bothers you, it's only because you're trying to hang on to the old sexist trope.
It would be far better to create and use a new and actually gender-neutral third-person singular pronoun. I like that better than pretending that the assumption of a feminine subject is somehow far less sexist than the assumption of a masculine subject. The latter is a rather puerile form of hypocrisy because reverse sexism is still sexism, a fact that must be acknowledged if you view the eradication of sexism as a worthy goal. That hypocrisy, the willful blindness to it, and the exhibition of both while telling others what they should do is the only baggage I see here.
It does exist and it's called the "generic they." I realize it pisses off quite a few of the grammar purists, but everyone from Shakespeare to Jane Austin to Mark Twain to George Bernard Shaw has used it. Consider the sentence "Nobody in their right mind would do a thing like that." Going purely by how it sounds to me, "Nobody in his right mind would do a thing like that" sounds outdated (like it's from a movie from the 50s) and "Nobody in her right mind would do a thing like that." sits about as well with my ears as spelling "women" as "womyn" does with my eyes. I think part of the problem with the sentence in question ("the key would be that there is a lot of what a developer needs and very little of what she doesn't need") is that saying such a thing using a singular form is awkward in and of itself. This book is written for all Python developers, so it sounds much more natural to me to say "the key would be that there is a lot of what developers need and very little of what they don't need." The bottom line is that using either pronoun generically sounds unnatural to me unless we're talking about a situation where only one gender can be involved (eg pregnancy for women, circumcision for men).
PS If you think English has sexist pathologies, you won't want to learn Spanish ("ellas" is plural feminine, "ellos is plural masculine, but for some reason a group of 200 women with one guy is still "ellos") or German (the generic pronoun is "man," although they're starting to use "frau" (women) in situations that only apply to women like pregnancy).
Good reason would be because the vast majority of the people being referred to are men. I wouldn't expect to find lots of masculine pronouns in nursing or child care when referring to the nurses or day care workers or in man-hating feminist diatribes when referring to feminists.
When political correctness is required I usually combine "she", "he", and "it" in a single pronoun. As in "shit is politically correct".
I'm definitely not female. I'm pretty sure my wife will vouch for me on that.
I'm not a "political-correctness" fanatic either. I pick the things I'm fanatical about and pretty much none of those things are political in any fashion.
It's been a bit since I wrote the review. I don't labor over these for days or anything. I usually knock them out in a couple hours or so. So I don't actually remember putting 'she' in there. It might have been a mistake. I do the original in google docs and I don't think it does any auto-correction so maybe not. Or I might have been thinking of my daughter and done it subconsciously. We've done python together working through "Hello World!".
Right now the phrase that's coming to mind is tempest in a teapot -- but I'm probably using that incorrectly too.
It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
To you, perhaps. To me, it sounds like I'm talking to someone who knows English grammar. The "generic they" is just plain wrong by modern English standards.
Language is defined by how native language speakers actually speak it, not by what purists (and dictionaries that they write) think it should be.
Bah, Python is for girls anyways. Everybody knows that PERL is the language of true men.
Actually, C is the language of true men (it's got dangling pointers in it, duh).