| List Price: | |
| Price: | $31.99 & eligible for FREE Super Saver Shipping on orders over $25. Details... |
| You Save: | $0.00(0.00%) |
| Binding: | Kindle Edition |
| EAN: | |
| Feature: | |
| Label: | Apress |
| Publisher: | Apress |
| Studio: | Apress |
| Tags: |
Editorial Reviews
Related Reviews
Great book & it comes for free!
Great Book for Experienced Programmers
Mark Pilgrim is an extremely accessible author. He teaches by example. Each chapter teaches powerful techniques and Python idioms by creating a useful program. Anybody with programming experience should be able to follow the examples and learn the language - although a few visits to the Python website docs may help along the way.
Each example is brief and annotated. The annotations combine with explanatory text to reveal the power of this incredible programming language. Python runs on virtually any popular platform and can be downloaded for free. Mark's excellent work will help empower the reader to do useful things almost immediately.
One of the early example programs reads through a directory of MP3 files and lists the header information, such as artist, album, etc. This is accomplished with just a few lines of code.
Mark makes the point that everything in Python is an object. While this is not a text on hard-core object oriented programming, it is an excellent opportunity for the OOP beginner to get a handle on it.
Pilgrim also emphasizes good programming techniques, such as documentation and unit testing. In one of the later chapters he even creates a Python unit testing framework that works for testing Python code to see if it performs as expected. Again, this example is annotated, used to develop both the software engineering skill of unit testing AND properties of the Python language.
He also covers accessing websites and parsing HTML and XML code. This is just an introduction to these subjects. Those interested in learning this in depth will want to continue their reading with other books and web pages focused on these topics.
The book is not dry or boring. It is not a manual. It is an excellent example of how to use the language AND how to think like a master programmer. The latter is reason enough to buy the book even if you're familiar with Python and have been coding for years.
It's a fun read. It's a great second book for somebody learning to program. It's a powerful example for those wishing to improve their programming style and/or learn object programming. I cannot say enough good things about it.
Furthermore, Mark maintains a website and blog. His articles vary from technically dense to enticingly interesting. He's even responded to email I sent him. How many authors do that?
If you found your way to this page, GET THE BOOK! Being here is proof that it's a good match for you. And if you just want to learn to program and have no experience - get the book anyway, then get a more basic book to go with it. DIVE INTO PYTHON will make you a quality programmer if you work your way through it.
EXCELLENT intro to Python for programmers
The author really understands the subject matter, and he really understands what is needed by readers who already have a strong programming background. Once you've worked your way through this book, you'll understand 1) Python, 2) Good programming practices in Python, and 3) Why Python has become such a success amongst professional programmers.
NOTE: If you don't already know programming, hold off on this book until later. If the whole topic of programming is brand new to you, go instead for Mark Lutz' book, "Learning Python (2nd edition)". Mark covers in great detail what could go wrong as you try things out. He insures you won't get lost. To do that, he has to be very explicit about everything. Experienced programmers don't need nearly so much detail, as they already know most of the stuff in the Lutz book, and will find themselves skipping trememdous amounts. These are the folks for whom this book is written.
I am finding this to be a great book for evangelization of others to the ranks of Python maniac.
Veterans of other languages will see here a reimplementation of many nice features of several languages. For example, C++ has its Standard Template Library. And the default Java installation comes replete with an extensive library. So too does Python. Pilgrim covers examples of key libraries in various chapters. Like one that knows HTML and another than can parse XML. So you don't have to go back to writing grungy low level code. And writing an XML parser is very tricky to get right. Java and C# programmers have also found introspection to be vital for writing more flexible and modular programs. So that one class can dynamically find another class's methods at runtime. Guess what? Python lets you do this too.
Python is also fully object oriented. Not bad for a 'mere' scripting language. Unlike some others, that are just weakly OO.
The style of the book is example-driven, with carefully chosen examples that introduce key sections of Python. In some way, like a bottoms-up approach. Pilgrim is forthright about the presentation; deliberately eshewing a more elegant, theoretical layout. Very nuts and bolts.
This is not a book for Python beginners. If you haven't done any Python programming before, but are an experienced program, I'd read the excellent tutorial chapter in Beazley's Python Essential Reference (it shouldn't take more than half an hour) and then proceed to Pilgrim's book.
I do have a few minor complaints. Pilgrim has a fondness for and/or constructions that cause me headaches everytime I see them. (Personally, I think it's a defect of the language that "x or y" is equal to either x or y. Hey, Guido, why not just support the ? : ternary operator?) The chapter on refactoring is weak and the example of unittest seemed artificial to me. Also, I could have used a few less language dialect examples. But this book is so much better than any of the other language books I've read in the last few years, that it seems ungrateful to complaint about minor defects.
The first time I read DIPy I was fascinated but knew I was missing a lot. I backtracked and read Beginning Python by Magnus Lie Hetland and some other basic Python books. DIPy does not dwell on the basics - it tells you once and expects you to make sure you understand before moving on.
I am reluctant to admit it but it wasn't untill the third read where everything made sense(Chapter 17 is especially wonderful). It also became clear that DIPy ventures where no other Python book goes and the author accomplished something extraordinary.
In short, DIPy was not a quick read but well worth the effort.
The best introduction to Python out there
Pretty much everyone who programs Python started with this book (the online version), so you can't go wrong, it's the Python "Bible".
It's not a beginner's guide - but that was pretty obvious. I think it's unfair to take away stars for that. ESPECIALLY because everybody can preview the PDF version online!
Good book, but don't get the Kindle Edition
Dive into Python
Briefly: don't get the Kindle edition. The point of Dive Into Python is to dive into code, presenting examples and discussing the examples. The Kindle edition is fatally flawed, in that the majority of the code is misformatted - it is wrapped into paragraphs is if it were text. This makes the code examples nearly unreadable, and they're the whole point of the Dive into Python book.
An excellent and practical guide to Python
1) The book does what the title promises - dives head in.
2) It introduces relatively wide range of topics in a readable manner.
3) Uses reasonably sized code examples
4) The writing is pretty clear and understandable
5) Has practical tidbits occasionally comparing similar functionality against C, C++, Java and Perl. Nice.
6) Provides links to further reading on a topic. Also very nice.
Cons:
1) Most topic discussions are a bit shallow and incomplete. For example it would be nice to present the reader with a comprehensive list of 'stuff' that may be done with a list, string, tuple, etc.
2) While there is a chapter on optimization, Mark doesn't mention the python profiler. I could live with that but there is no mentioning of python debugger (pdb) and there is nothing in the book about logging, either. These should not be considered 'advanced topics' and left out as they are helpful tool in learning any language (my opinion).
3) The book examples follow the 'Look at this cool yet obfuscated stuff I can do with Python - and oh, BTW, this is what it really means' methodology. While the follow-up discussions are reasonable, I would much more appreciate an explanation or at least mentioning of a concept before I get hit by a semi-cryptic line of code. On the other hand, the code is well annotated.
4) Mark uses repetitive examples to illustrate a point. 'This is how to do something', followed by 'This is how to do it better', followed by 'This is how to do it really well'. While illustrative of potential pitfalls, bugs or code deficiencies, this kind of writing makes it impractical to use the book as a reference. Open the book at the wrong page and follow the less than perfect example. Not a good thing. And boring - if I wanted to see it done the wrong way I'd use perl ;-).
5) Mark's statement that C++ virtual methods: 'confuse the hell out of me' (pg. 84) is rather amusing. I'd suggest to skip the amusement as it doesn't give a casual reader a whole lot of confidence in author's understanding of method overloading. Humor me some other ways.
However, this book is about Python, not C++, so I don't hold it against the author :)
In conclusion:
Quite reasonable book for the money, gets you a pretty good jumpstart. Coming from C/C++ background, general programming concepts are not totally lost on me and there are enough practical differences between Python and C++ that this book was worth the read.
The chapters on HTML, XML and SOAP were the primary reason I bought this book. Again, while not covered in depth, I got enough from them to get started with a small practical application.
If you're serious about developing any kind of meaningful code this is a reasonable start but you'll need to dig deeper.
I recently opted for buying Wesley Chun's Core Python Programming (2nd Edition) (Core Series) as it covers more topics in greater depth (it's the details that matter a lot) in quite comprehensive manner while still very understandable by a novice programmer.
O'Reilley's Python Cookbook by Alex Martelli et. al is also a very good complementary reading exposing quite imaginative ways of using even some very basic capabilities of Python.
Excellent gateway book for Python
Dive Into Python is the name of author Mark Pilgrim's site for learning Python. The text of the book is available, as are links to other great resources for learning Python. I noticed no differences between the print version and the published version. I have to commend the author on making his book freely available in electronic form as well as print form because it allowed me the freedom to have the book with me wherever I needed it, and increased the value of the book.
One of the major strengths of Dive into Python is the author's use of other languages to teach Python. The book contains examples from Perl, Java and Visual Basic to elaborate concepts familiar to all four languages. This helped me to use my knowledge from these other languages to grasp both the similarities and differences between the languages. When discussing dictionaries in Python, the author gives three comparisons, starting with Perl: "A dictionary in Python is like a hash in Perl. In Perl, variables that store hashes always start with a % character. In Python, variables can be named anything, and Python keeps track of the datatype internally." Directly beneath that is the comparison for Java programmers: "A dictionary in Python is like an instance of the Hashtable class in Java." Visual Basic follows: "A dictionary in Python is like an instance of the Scripting.Dictionary object in Visual Basic." Other books have done this, but what makes this especially friendly is how the author separates this from the text, so you don't miss it. Each of these examples is in a bullet list, rather than embedded in the text for brevity (I can easily see an author abbreviating the above as "Perl uses hashes, Java uses Hashtables, and Visual Basic uses Scripting.Dictionary", which could easily be missed).
Dive Into Python is comprised of the the following chapters: Installing Python, Your First Python Program, Native Datatypes, The Power Of Introspection, Objects and Object-Orientation, Exceptions and File Handling, Regular Expressions, HTML Processing, XML Processing, Scripts and Streams, HTTP Web Services, SOAP Web Services, Unit Testing, Test-First Programming, Refactoring, Functional Programming, Dynamic functions, and Performance Tuning. Most chapters have a similar format, generally starting with code for a specific projects. As with most any book, these projects are canned projects, ranging from printing methods in doc strings, printing ID3 info in a directory of MP3 files, or doing a simple Google search from the command line. The examples are complete, working programs, and the introduction of foreign concepts explained in the chapter really helped my learning process out. My natural curiosity took over, so I would find myself flipping back and forth in the chapter to see where the line of code, or idiom was used in the beginning program and start understanding how and why that piece of code worked. The author also makes a point whenever he uses a particular idiom from Python to note the last time it was used, or where it was introduced. I found it exceptionally helpful, though the technique lends itself better to an electronic format than it does in a printed book. Another useful technique is the bulleted list. A quick (and very abridged) example would be where the author is initially describing lists:
>>> li = ["a", "b", "mpilgrim", "z", "example"] (1)
(later on in the example)
(1) First, you define a list of five elements. Note that they retain their original order. This is not an accident. A list is an ordered set of elements enclosed in square brackets.
The above example is just a small taste of the format. For me this was a very helpful approach to understanding what each line was doing, and allowed the author to show the code first, and then explain the parts he wanted to elaborate more in the bulleted lists.
Dive Into Python is an excellent tutorial for learning the Python Language. The author is quick to point out new concepts and idioms of the language in a way that is both clear and at times very witty. The author also conveys his enjoyment of the language in a non-threatening and patient way, which makes Dive Into Python an excellent tutorial for those who are, like me, already familiar with other languages, and want to know more about Python. My only complaint about Dive Into Python is that there hasn't been an update since 2004 to this great text. Perhaps when Python 3000 is released, the author will once again revisit this book. As it stands, I highly recommend anyone looking for a good introduction to Python check out Dive Into Python.
Fun introduction to Python for programmers
I enjoyed the book a lot. The book gave me more credit than a book like Learning Python which starts at the very basics. And for a book of relatively few pages it gets into some cool topics like refactoring, unit tests, and functional programming very quickly.
If you want an introduction to Python that doesn't talk down to you then dive in Python here.
Great choice for a Python-newbie
Now what is this approach I'm praising here? In short, it's the good ol' get-your-hands-dirty-quick method of diving head first into actual, meaningful code to figure out what it does, why it works, and thereby figuring out new language features a couple at a time. For example, on page 11 you don't get a list of reserved words in Python or a brief history of how one programming language lead to another, but instead you get a code listing for a little program that takes a dictionary and constructs an ODBC connection string out of it. Simple? Yes, but much more interesting than seeing the syntax for a for-loop. Throughout the book, Pilgrim shows you how to use Python in parsing strings, processing XML, evaluating regular expressions, calling web services, and what not.
"Dive Into Python" is not a reference you can turn to with any Python question imaginable. Instead, it's a very effective tutorial and overview of what (and how) you can do with Python.
Dive in and start programming with the first chapter
The book starts with the basics and by the end has given the reader a good foundation in Python. Areas covered include declaring functions, dictionaries, lists, variables, string formatting, objects, importing modules, working with classes, exceptions, file objects, loops, regular expressions, html processing, xml processing, scripts and streams, http web services, SOAP web services, refactoring, and dynamic functions. With lots of code examples it is easy to follow along with the text and begin writing useful programs quickly.
This is a basic text on Python. It includes everything you need to start programming basic programs. There are more advanced books available but they all tend to assume that you at least have this foundational knowledge in order to understand how they use Python to access a database or make your program network aware with TCP/IP functions, or similar more advanced functions. If you are new to Python this is an excellent place to start and get up to speed quickly by actually working with the program from the first day. Dive Into Python is a highly recommended purchase.
I found it to be very interesting and engaging. It was never boring because you were always learning about a program that did something useful. I highly recommend it to anyone who wants to learn Python.
At it's worst, the code block at the beginning of chapter 5 is completely unreadable without a magnifying glass, and I have 20/20 vision!
Amazon has some work to do with monospaced fonts in programming books and until those are worked out, I would strongly suggest anyone considering this book hold off on purchasing.
He shows you essential tricks to writing useful object oriented Python code right from the start.
This is not an exhaustive text relating every aspect of the language but rather a quick in-depth guild to writing effective code using the full power of Python.
"Zero care" applied to printing
For the original book, and free license terms, see diveintopython.org
Great Python books for experienced programmer!
Do *NOT* buy the $1 kindle version though. This was not released by Mark or the publisher, and is not formatted in any way. This version is impossible to use!
If you have a Kindle I'd recommend the official version from the Publisher, or downloading it for free and formatting it yourself.
My background:
Aerospace Engineer, one single class in C++ programming, but currently out in the "real world" doing other work. I've taken up learning Python as a hobby because it's much more productive than C++ for fooling around. I've made plenty of Matlab, C++, and a few Java programs for things as various as finite element calculations and simple asci games. I wanted to learn a language that was easier to use for graphics and general computer tasks than any of the above mentioned languages, so I went for Python. I wanted to spend time in Lisp, but I was disappointed with the available software. Right now I'm using a Python (x,y) install and the Eclipse IDE.
This book is organized in very manageable chunks (chapters), which probably take an hour or two to read, understand, and program up. It is far easier to read than the other programming book I have used, which was Savitch's absolute c++. Having been through some programming before, I don't find the concepts in this book too difficult to grasp, as I already understood the idea of pointers. Others (new programmers) that are unaware of what pointers are may be confused by some of the concepts in this book. I can honestly say that if you do not understand what pointers/addresses are in computer languages to hold off on this book until you know a little more. I was able to make sure the IDE was configured properly and that it was looking for files in the right place because I've dealt with IDEs and compilers before and can generally stumble my way through getting them to cooperate. Someone new to programming might get hung up on things like this and get frustrated, as this book expects you to already be able to wrangle the necessary tools and just program.
This book teaches by example, and expects you to follow along. The only downside of this is it's not quite as good as a reference as it would have been if it was more thorough, but plenty of help can be found online about Python. Another minor issue is the author doesn't necessarily announce when he is providing an example with an imaginary module, so when you try to run the hypothetical example the interpreter doesn't recognize the module you are trying to import.
I love how this book jumps right into business, and I am very impressed with the way that it immediately gets into the power and capabilities of the language. He doesn't beat the concepts to death, but expects you to actually take the time to understand what is going on without an excessive amount of "let me repeat this 10 times because you're stooopid" and handholding.
I highly recommend that if you want to get into Python right away to grab this book, install Eclipse by itself or a distribution like Python(x,y) for scientific/engineering tasks, and start plugging away.
One thing I wish I'd have known prior to purchasing the book is that the entire thing can be found at www.diveintopython.org.
In short, I use DIP in the same way that I use the abstracts of journal articles: it tells me everything I want to know 90% of the time and the other 10% of the time it tells me where to look to read more.
Brilliant Python introduction for experienced programmers
The text covers python very well (IMHO), but also touches XML parsing, web services, test-first programming, performance tuning and other techinques that I found very useful.
It is also quite funny to read...
Excellent running introduction to the Python language
This is an introduction to the language, not a reference. Experienced Python developers need not apply.
Excellent Introduction for Experienced Programmers
Best Python Book for Experienced Programmers
This "dives" right from the start into the Python idioms that make the language so cherished by its followers.
Wonderful book, and wonderful language.
didn't care for it - not for programming newbies
At the very least, skim the free online version before buying it. I got a copy from a friend and found it tough going. The first chapter 'dives' right into dictionaries and I didn't find it clear at all. Didn't make it past the first 2 or 3 chapters before looking for something else. The visual layout could also be better.
Not for Newbies to Python or OOP
If fact, I think that really you should already know Python pretty darn well to be able to make use of the "efficient" syntax examples.
If you don't understand OOP already, you might find youself completely lost.
By the time you learn everything you need to know to understand this book... you won't need it.
It gets an extra star simply because it contains no painful-to-read Monty Python references which stopped being funny around 1985; something the official documentation cannot claim.
essentially "Quick Python" second edition albeit abridged
UPDATE: I'm on another Python contract and have had occasion to pull this book off the shelf again. And I have another complaint: the index is next to worthless. I stand by my initial review, and am really baffled that it's gotten only 1 out of 14 helpful votes thus far, apparently mostly friends of the author or people that think Python and or this book is some sort of Golden Hammer
Create your own review


