Dive Into Python 3 and over 2 million other books are available for Amazon Kindle . Learn more

Sign in to turn on 1-Click ordering.
Trade in Yours
For a 4.50 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Sorry, this item is not available in
Image not available for
Image not available

Start reading Dive Into Python 3 on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Dive into Python 3 (Books for Professionals by Professionals) [Paperback]

Mark Pilgrim
1.3 out of 5 stars  See all reviews (3 customer reviews)
Price: 35.49 & FREE Delivery in the UK. Details
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In stock.
Dispatched from and sold by Amazon. Gift-wrap available.
Want it Saturday, 19 April? Choose Express delivery at checkout. Details


Amazon Price New from Used from
Kindle Edition 26.62  
Paperback 35.49  
Trade In this Item for up to 4.50
Trade in Dive into Python 3 (Books for Professionals by Professionals) for an Amazon.co.uk gift card of up to 4.50, which you can then spend on millions of items across the site. Trade-in values may vary (terms apply). Learn more

Book Description

19 Oct 2009 1430224150 978-1430224150

Mark Pilgrim's Dive Into Python 3 is a hands-on guide to Python 3 and its differences from Python 2. As in the original book, Dive Into Python, each chapter starts with a real, complete code sample, proceeds to pick it apart and explain the pieces, and then puts it all back together in a summary at the end.

This book includes:

  • Example programs completely rewritten to illustrate powerful new concepts now available in Python 3: sets, iterators, generators, closures, comprehensions, and much more
  • A detailed case study of porting a major library from Python 2 to Python 3
  • A comprehensive appendix of all the syntactic and semantic changes in Python 3

This is the perfect resource for you if you need to port applications to Python 3, or if you like to jump into languages fast and get going right away.

What you’ll learn

  • To understand Python 3 code by seeing it broken down and explained
  • How to make full use of the latest Python features such as iterators, generators, closures, classes and comprehensions
  • How to refactor existing code to improve maintainability
  • How to serialize Python objects with the pickle protocol and JSON format
  • How to package your own Python libraries and upload them to the Python Package Index to share your projects with Python developers worldwide
  • How to use Python 3 to consume HTTP web services
  • How to port existing Python applications to Python 3 by following a case study for a major library

Who this book is for

  • Anyone who wants to learn the latest version of Python in a fast, hands-on fashion
  • Existing Python programmers who want to learn quickly how to make the most of the features of the latest version of Python and port their code to it
  • Programmers coming from other languages wanting a fast introduction to Python that gets them thinking about advanced concepts quickly

Table of Contents

  1. Your First Python Program
  2. Native Datatypes
  3. Comprehensions
  4. Strings
  5. Regular Expressions
  6. Closures and Generators
  7. Classes and Iterators
  8. Advanced Iterators
  9. Unit Testing
  10. Refactoring
  11. Files
  12. XML
  13. Serializing Python Objects
  14. HTTP Web Services
  15. Case Study: Porting chardet to Python 3
  16. Packaging Python Libraries

Frequently Bought Together

Dive into Python 3 (Books for Professionals by Professionals) + Python 3 for Absolute Beginners (Expert's Voice in Open Source)
Buy the selected items together

Product details

  • Paperback: 360 pages
  • Publisher: APRESS (19 Oct 2009)
  • Language: English
  • ISBN-10: 1430224150
  • ISBN-13: 978-1430224150
  • Product Dimensions: 23.4 x 18.8 x 2.5 cm
  • Average Customer Review: 1.3 out of 5 stars  See all reviews (3 customer reviews)
  • Amazon Bestsellers Rank: 131,991 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, and more.

Product Description

About the Author

Mark Pilgrim has been an advocate of open source and open standards for over 15 years. He lives in North Carolina with his wife, two children, and a floppy-eared dog.

Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index
Search inside this book:

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

5 star
4 star
3 star
1.3 out of 5 stars
1.3 out of 5 stars
Most Helpful Customer Reviews
7 of 8 people found the following review helpful
1.0 out of 5 stars Terrible 25 Mar 2011
This is a truly awful book - I bought it on thinking it was "for Professionals by Professionals". It appears it's neither in my opinion. I've been buying tech books for over 20 years and this is probably one of the worst I've ever had. Simple random searching on the web will teach you Python faster.
Comment | 
Was this review helpful to you?
16 of 23 people found the following review helpful
1.0 out of 5 stars A book for beginners by amateur writers 10 Feb 2010
Very disappointing.

I was looking for a book aimed at teaching Python to a professional developer. This book has been written in a style suited for beginners who probably don't know any other programming language.

The book starts off with 30 pages of screenshots discussing how to install Python on various platforms, then presents the reader with tutorial type chapters on various aspects of the language. There's only about 100 pages of real information on the language itself. The remaining chapters discuss fringe subjects such as regular expressions, unit testing, refactoring, http services, porting, etc.

Not sure where the 500 pages were. The book only has about 350 in total, with only about 100 discussing the language itself.

The book itself is a print-on-demand type, with low grade paper and is in black and white (i.e. code is not color highlighted).
Was this review helpful to you?
3 of 17 people found the following review helpful
2.0 out of 5 stars Python 3 2 Jan 2011
By Razor
First of all it covers only Python 3 so anybody who loves easy structuring and codes in Python 2.. well you're screwed with this book because its all around python 3 and its modules to make it seem as much as c++ as possible
Was this review helpful to you?
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com: 3.2 out of 5 stars  23 reviews
49 of 51 people found the following review helpful
2.0 out of 5 stars good content, but poorly produced physical book 25 Mar 2010
By ErikB - Published on Amazon.com
Format:Paperback|Verified Purchase
I came to this book after slogging through 200pgs of the tome that is Learning Python and getting nowhere. Dive into Python 3 is a more reasonable size, and from reading a few of the chapters online at [...], I felt that Mark Pilgrim had done a good job of writing a Python introduction. I would probably rate the content as 4 or 5 stars.

I was happy enough that I wanted to buy the physical printed edition of the book, to have as a reference and to support the author. I was expecting that the content had been professionally reformatted for book form, with suitable typeface selection and reflowed text. However, I was sorely disappointed when I received my printed copy. It would appear that SoHo Books has done nothing but take the PDF from Mark Pilgrim's site and printed it. I might not mind, except that this was done very poorly. I immediately noticed that the typeface was small, sans-serif, and worst, dithered! The letters are drawn with small,fine dots as if this were printed on an old dot-matrix printer. The result is unlike any other printed book I have, and I consider this unacceptable. The fonts in the PDF appear to be vector drawn when I scale it, and thus SoHo has no excuse for not doing a cleaner job of scaling the pages down. And that's all they did: take pages formatted for 8.5" x 11" and scale them down to about 5.5" x 7" or so. Further, they wastefully left 1.75" of dead white space on top and 1.5" on the bottom.

This cheap printing is a shameful waste of a tree, when it could have been done really well. I would have a much higher quality version if I had printed it on my own printer. I thank the author for licensing his work with the Creative Commons license, but I'm sad to report that I'll be returning this print version. I'll hold out hope that these problems could be corrected for future printings.
31 of 34 people found the following review helpful
5.0 out of 5 stars A great book with which to start 4 Oct 2009
By calvinnme - Published on Amazon.com
Python now comes in two flavors--Python 3 and Python 2. The philosophy of programming in Python 3 diverges from Python 2 to the point that print statements written in three don't even run properly in two. Unfortunately, so many of the books written using Python over the last few years are still using version 2.6 - which is backwards compatible with all previous versions. If you are buying this book because you are taking a class in which the teacher is using Python rather than teaching it -bioinformatics or visualization for example - this may cause you trouble. If you need to learn 2.6 or an earlier version of Python 2, please buy the previous edition.

If you are learning Python for the first time and it's up to you as to what flavor of Python to learn, then I suggest you start with Python 3. It does fix some longtime problems with the Python language. In that case, this edition of "Dive Into Python" is what you want.

I tend to learn languages more readily if I write a simple program first then add to its complexity by having more complex aspects of the language revealed to me, which is basically the approach of "Dive Into Python". What worked best for me when I learned Python 2 was to read the free online guide "Dive Into Python" which is incomplete but top-down, then switch to "Learning Python", which is detailed but more academic and more of a bottom-up approach. For example, while this book is about 500 pages, the new "Learning Python" book by Mark Lutz is 1200 pages long.

The author of this book has continued his tradition of placing his book online free of charge if you wish to look through it. I have read this updated version in order to update to Python 3. However, the author realizes that if you like his book you'll want a copy for yourself to carry about and in which to scribble notes. Sometimes you can make more money by being generous.

In summary, I highly recommend this book as a way to get started, but then you'll probably want to proceed to "Learning Python" for advanced topics and as a reference.
24 of 26 people found the following review helpful
1.0 out of 5 stars *very* poor print quality 18 July 2010
By J. Hopson - Published on Amazon.com
Format:Paperback|Verified Purchase
The print quality of this book is awful. My copy looks like it was printed on a cheap inkjet printer. The print is tiny. Really tiny. And the top and bottom margins are 1-3/8" each! Seriously, is this a joke?

This book probably has some great content, but the print quality is so bad it's worthless.
26 of 30 people found the following review helpful
1.0 out of 5 stars 20 dollar doorstop 21 April 2010
By Jake Robinson - Published on Amazon.com
Format:Paperback|Verified Purchase
After reading a few reviews on what was the best book to learn python, I decided to try out Dive Into Python 3. I however came to the realization, after my purchase, that buying(as this book can also be downloaded free) was a mistake.

Arriving at my door step early in the morning I hurriedly opened the package to "Dive" into it. Firstly, I noticed that the review that stated the book was an exact replica of the PDF version was not joke. The book is littered with many underlined phrases that, on a computer, would surely skip you to a informative webpage or future chapter. No problem, I skip the introduction and go for the meaty bits.

The book teaches python like a biology teacher would teach about a frog's organs. It gave me code that is dissected and then explained. So, as the title suggest, I dived strait into Python by typing the "code" into my computer and observing how it works.

However, while compiling the first example program, I ran into some issues. A real stynax and string definition nightmare. Something wasn't right, I had installed all the right programs, versions matched up and my code was identical to the book, but there where still issues. So I go online and check the HTML version. Turns out the book is printed without any underscores......

Will stop a door or make a good paperweight

Source code is useless
Continually have to check online version

My recommendation would be to download the PDF version and give Mark Pilgrim a donation.
12 of 13 people found the following review helpful
1.0 out of 5 stars Don't Buy The SoHo Press Edition of this Book 21 Oct 2010
By STEPHEN P MCCRAY - Published on Amazon.com
Format:Paperback|Verified Purchase
I read the original Dive Into Python (printed by APress) and enjoyed it enough that after starting to read the online edition of Dive Into Python 3 I decided to grab a print copy. I really really should've been paying attention and read the other reviews. The SoHo edition is a poorly printed copy of the content available online, and not even adjusted to fit to the book's format. The text is dithered (and therefore hard to read), and all hyphens and underscores are missing from the text and code samples.

I would strongly recommend looking for the APress printing of this book. I learned to write python from Dive Into Python and Pilgrim's writing style is interesting and engaging enough that I'm planning on rereading through most of Dive Into Python 3 (and have enjoyed the little I have read so far), but please don't reward the author's generosity in licensing this book under Creative Commons by buying a copy that does such poor justice to it.
Were these reviews helpful?   Let us know
Search Customer Reviews
Only search this product's reviews

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
First post:
Prompts for sign-in

Search Customer Discussions
Search all Amazon discussions

Look for similar items by category