- Paperback: 706 pages
- Publisher: O'Reilly Media; 3 edition (June 1, 2013)
- Language: English
- ISBN-10: 1449340377
- ISBN-13: 978-1449340377
- Product Dimensions: 7 x 1.4 x 9.2 inches
- Shipping Weight: 2.5 pounds (View shipping rates and policies)
- Average Customer Review: 129 customer reviews
- Amazon Best Sellers Rank: #17,919 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Python Cookbook, Third edition 3rd Edition
Use the Amazon App to scan ISBNs and compare prices.
Frequently bought together
Customers who bought this item also bought
From the Publisher
From the Preface
Rather than attempting to seek out Python 3-specific recipes, the topics of this book are merely inspired by existing code and techniques. Using these ideas as a springboard, the writing is an original work that has been deliberately written with the most modern Python programming techniques possible. Thus, it can serve as a reference for anyone who wants to write their code in a modern style.
In choosing which recipes to include, there is a certain realization that it is simply impossible to write a book that covers every possible thing that someone might do with Python. Thus, a priority has been given to topics that focus on the core Python language as well as tasks that are common to a wide variety of application domains. In addition, many of the recipes aim to illustrate features that are new to Python 3 and more likely to be unknown to even experienced programmers using older versions.
There is also a certain preference to recipes that illustrate a generally applicable programming technique (i.e., programming patterns) as opposed to those that narrowly try to address a very specific practical problem. Although certain third-party packages get coverage, a majority of the recipes focus on the core language and standard library.
Who This Book Is For
This book is aimed at more experienced Python programmers who are looking to deepen their understanding of the language and modern programming idioms. Much of the material focuses on some of the more advanced techniques used by libraries, frameworks, and applications.
Throughout the book, the recipes generally assume that the reader already has the necessary background to understand the topic at hand (e.g., general knowledge of computer science, data structures, complexity, systems programming, concurrency, C programming, etc.). Moreover, the recipes are often just skeletons that aim to provide essential information for getting started, but which require the reader to do more research to fill in the details. As such, it is assumed that the reader knows how to use search engines and Python’s excellent online documentation.
Many of the more advanced recipes will reward the reader’s patience with a much greater insight into how Python actually works under the covers. You will learn new tricks and techniques that can be applied to your own code.
Who This Book Is Not For
This is not a book designed for beginners trying to learn Python for the first time. In fact, it already assumes that you know the basics that might be taught in a Python tutorial or more introductory book. This book is also not designed to serve as a quick reference manual (e.g., quickly looking up the functions in a specific module).
Instead, the book aims to focus on specific programming topics, show possible solutions, and serve as a springboard for jumping into more advanced material you might find online or in a reference.
About the Author
David Beazley is an independent software developer and book author living in the city of Chicago. He primarily works on programming tools, provide custom software development, and teach practical programming courses for software developers, scientists, and engineers. He is best known for his work with the Python programming language, for which he has created several open-source packages (e.g., Swig and PLY) and authored the acclaimed Python Essential Reference. He also has significant experience with systems programming in C, C++, and assembly language.
Brian K. Jones is a system administrator in the department of computer science at Princeton University.
Try the Kindle edition and experience these great reading features:
129 customer reviews
Review this product
Read reviews that mention
Showing 1-8 of 129 reviews
There was a problem filtering reviews right now. Please try again later.
This book has showed me how to do a lot of new things, and even if I already knew how to do something, now I know how to do it better, faster, cleaner, or more robustly.
The book is also well written. Finding the material, and reading through the narratives for particular snippets of code is very clear, there's rarely a need to go back to re-read anything, ideas are conveyed simply but effectively.
I own a bunch of other Python books, but they all have a time and place in your learning process. This book spans so much material, that it is much more universal; I keep going back to it to look things up, sometimes for no other reason but to verify that I'm on the right path.
One particular recipe that I liked was 9.1 on how to time a function. When I am using Python I often need to time the code, and usually I need to look up how to do it. This example created a decorator function for timing. It makes it so that you can just put @timethis on top of a function and see how long it takes to execute. I appreciated how elegant this solution was as opposed to the way I was implementing it.
Most examples are self contained and all the code examples that I tried worked. Additionally, there is a GitHub that the authors created which provides all the code for the examples if you do not want type it yourself. The examples themselves were applied to real world problems; I could see how the recipe was used clearly. When the authors felt they could not provide an entire solution in the text, they point the correct place to visit online.
The range in topics was impressive. I found the most challenging chapters to be 9, 12, and 15 which were on metaprogramming, concurrency, and C Extensions. At the beginning of the book the recipes cover topics you would expect like data structures and algorithms, strings, and generators. I found myself surprised that I had not seen a lot of the techniques and solutions before. They were well crafted solutions, and I appreciated how much time and detail the authors must have spent to gather the information.
This is a great reference to have by your side when programming in Python.
I just bought this today. Unlike some early technical Kindle books I've purchased, the formatting is excellent. Kudos to the authors and publisher. But when I first browsed the content with Kindle-Android on my 7" tablet (Nexus), I still found it frustrating to read. Next, I tried my laptop with a 14" screen - better. And then tried it on my PC with a large monitor and found reading and jumping around the content much more productive and pleasurable. Switched back to the tablet, I changed the text settings to minimums for font size, margin size, line spacing and entered full-screen mode. Result: much better! That said, I still found the much larger screen area on my PC monitor preferable.
Bottom Line: Buy this for great Python 3.3 code and advice in a flexible format.