Python Cookbook, 3rd Edition
Recipes for Mastering Python 3
Publisher: O'Reilly Media
Final Release Date: May 2013
Pages: 706

If you need help writing programs in Python 3, or want to update older Python 2 code, this book is just the ticket. Packed with practical recipes written and tested with Python 3.3, this unique cookbook is for experienced Python programmers who want to focus on modern tools and idioms.

Inside, you’ll find complete recipes for more than a dozen topics, covering the core Python language as well as tasks common to a wide variety of application domains. Each recipe contains code samples you can use in your projects right away, along with a discussion about how and why the solution works.

Topics include:

  • Data Structures and Algorithms
  • Strings and Text
  • Numbers, Dates, and Times
  • Iterators and Generators
  • Files and I/O
  • Data Encoding and Processing
  • Functions
  • Classes and Objects
  • Metaprogramming
  • Modules and Packages
  • Network and Web Programming
  • Concurrency
  • Utility Scripting and System Administration
  • Testing, Debugging, and Exceptions
  • C Extensions
Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyPython Cookbook, 3rd Edition
 
4.7

(based on 21 reviews)

Ratings Distribution

  • 5 Stars

     

    (15)

  • 4 Stars

     

    (5)

  • 3 Stars

     

    (1)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

100%

of respondents would recommend this to a friend.

Pros

  • Helpful examples (18)
  • Accurate (16)
  • Concise (16)
  • Well-written (15)
  • Easy to understand (14)

Cons

  • Not comprehensive enough (3)

Best Uses

  • Intermediate (19)
  • Expert (14)
  • Student (10)
  • Novice (8)
    • Reviewer Profile:
    • Developer (15), Sys admin (7), Educator (3)

Reviewed by 21 customers

Displaying reviews 1-10

Back to top

Previous | Next »

 
5.0

Excellent book

By rrehders

from Toronto ON

About Me Project manager

Verified Buyer

Pros

  • Accurate
  • Concise
  • Helpful examples

Cons

    Best Uses

    • Intermediate

    Comments about oreilly Python Cookbook, 3rd Edition:

    As with other books in the cookbook series, this is a great reference for finding a "pattern" for the most efficient way to resolve a particular programming problem. from there I typically brach to other books to fill int he gaps in my understanding of the language.

    (2 of 2 customers found this review helpful)

     
    4.0

    "Useful overall, but…"

    By TDK

    from Seattle, WA

    About Me Developer

    Verified Buyer

    Pros

    • Accurate
    • Concise
    • Easy to understand
    • Helpful examples
    • Well-written

    Cons

      Best Uses

      • Intermediate

      Comments about oreilly Python Cookbook, 3rd Edition:

      In my day job, I am a Python developer (newly minted, after a career in the C/C++ salt mines). I needed to find a way to control object creation (basically, a variation of the multi-Singleton pattern). I got the Python Cookbook, 3rd edition. It had what I needed, so that was good. However, my big beef is that the book is focussed on Python 3. I know the Python core group just wishes Python 2.7 would die already, but a great many of us are not going to be able to move to Python 3 any time soon (or ever, in many cases), and ignoring all of us in favor of the shiny new three-ness is annoying. I spent a bootless hour trying to find a way to get the 2nd edition, so I'd have recipes that applied to the Python I'll be writing for the foreseeable future, but no such luck. So understand that while the recipes here are good, unless you have already obtained Python 3 nirvana you're going to have a tough row to hoe to apply them to your code.

      (0 of 1 customers found this review helpful)

       
      5.0

      Value for my money

      By Sto

      from Gaborone, Botswana

      About Me Developer

      Verified Buyer

      Pros

      • Accurate
      • Concise
      • Easy to understand
      • Helpful examples
      • Well-written

      Cons

        Best Uses

        • Expert
        • Intermediate
        • Student

        Comments about oreilly Python Cookbook, 3rd Edition:

        The book is well written, pure and simple.

        (1 of 1 customers found this review helpful)

         
        4.0

        Great Help for Later Half of Class

        By TMitchum

        from Fairfax,VA

        About Me Developer, Student

        Verified Buyer

        Pros

        • Accurate
        • Concise
        • Easy to understand
        • Helpful examples

        Cons

        • Too basic

        Best Uses

        • Intermediate
        • Student

        Comments about oreilly Python Cookbook, 3rd Edition:

        I should have gotten this very book much sooner in the semester. It starts with dictionaries, unpacking techniques and clearly starts with material for a programmer who already has experience in Python 3.4.
        The book was a great help for file reading & writing, and other operations. It is because of this book that I continue to read that I am creating new projects for myself to continue learning new concepts outside of the classroom, and, even after I finished the course.
        I highly recommend this book to anyone who has some experience in Python programming.

        (3 of 9 customers found this review helpful)

         
        3.0

        I would like to see what versions it is

        By UnixSA

        from UK

        About Me Developer, Sys Admin

        Verified Reviewer

        Pros

        • Good Example

        Cons

        • Not comprehensive enough

        Best Uses

        • Intermediate

        Comments about oreilly Python Cookbook, 3rd Edition:

        I confess that I haven't read through the whole book yet. There is however 1 thing I think the book is lacking but very important. Which versions of python are applicable for the piece of code.
        As an SA, since linux are still shipped with 2.x python, a lot of the examples don't work on these platforms. In chapter 1 for example, the variable element expansion doesn't apply to version 2.x python. In fact most of the discussion in chapter 1 doesn't apply to 2.x python.

        I am yet to finish reading the book. but the lack of version information really annoys me.

         
        5.0

        Must have if you are a Python programmer

        By Amit Saha

        from Brisbane, Australia

        About Me Developer, Educator

        Verified Reviewer

        Pros

        • Accurate
        • Concise
        • Easy to understand
        • Helpful examples
        • Well-written

        Cons

          Best Uses

          • Expert
          • Intermediate

          Comments about oreilly Python Cookbook, 3rd Edition:

          I received this book as part of the Blogger review program.

          The book has 15 chapters full of recipes on various aspects of Python ranging from data structures to concurrency and system programming. Authors do a great job and while you won't perhaps benefit from reading this book page to page, but you may certainly as well, since you will most likely learn new things all throughout.

          All in all great book, must have.

           
          5.0

          It is great

          By eavilesmejia

          from Nicaragua

          Verified Reviewer

          Pros

          • Concise
          • Easy to understand
          • Helpful examples

          Cons

            Best Uses

              Comments about oreilly Python Cookbook, 3rd Edition:

              I recommend this book to have a solid learning in python, it use pythonic syntax to resolve the problems.

              (4 of 4 customers found this review helpful)

               
              5.0

              Fantastic Cookbook

              By JimSchubert

              from Seattle WA

              About Me Developer

              Verified Reviewer

              Pros

              • Accurate
              • Concise
              • Easy to understand
              • Helpful examples
              • Well-written

              Cons

                Best Uses

                • Expert
                • Intermediate
                • Novice
                • Student

                Comments about oreilly Python Cookbook, 3rd Edition:

                I read Python Cookbook as part of the O'Reilly Bloggers program. I would highly recommend Python Cookbook to developers with any level of expertise, provided they understand the basic syntax and usage of Python 3.

                I don't use Python regularly. I've stayed away from Python for a while because of the parallel development of the 2.x and 3.x versions of Python. One of the things I loved about this book is that the authors clearly state that the intention of the book is to cover Python 3 only. In fact, many of the recipes won't work in Python 2.x. The book's contents have made me rethink avoiding Python.

                I consider myself somewhat familiar with Python basics, which is required if you want to gain the most from this book. While the book does start of with some simple recipes (like list comprehensions, string manipulations, math operations), it eventually delves more into advanced topics like metaprogramming, socket programming, and the intricacies of working with threads.

                It may not cover extremely advanced topics in Python, but the book comes close. The last chapter discusses interacting with C libraries which you may already have experience with if you've read Gray Hat Python (also available from O'Reilly). I consider language interop a pretty advanced topic.

                In all, I was very pleased with the content and delivery of this book. I generally bookmark one or two pages in a book, but with this book I ended with 12 bookmarked pages. It definitely left me excited about developing applications with Python 3.

                One caveat to readers: some of these recipes are for demonstration purposes only and should not be used in production code. For example, recipe 10.11 shows how you'd load modules from a remote machine using import hooks. Just because you *can* do this, doesn't mean you should.

                (1 of 1 customers found this review helpful)

                 
                5.0

                Python Cookbook Review

                By Nerdy Dude

                from Hollis, NH

                About Me Developer

                Verified Reviewer

                Pros

                • Accurate
                • Concise
                • Easy to understand
                • Helpful examples
                • Well-written

                Cons

                  Best Uses

                  • Intermediate
                  • Novice
                  • Student

                  Comments about oreilly Python Cookbook, 3rd Edition:

                  For those learning Python, personally, I would recommend Learning Python by Mark Lutz but as a companion book, this Python Cookbook is wonderful!
                  It'll help you learn a little bit about Python if you're starting out but once you get the basics down, the Cookbook series are THE way to go.
                  Working with file I/O? This book has a recipe for you. Doing networking? This book has a recipe for you. Need to process through data from various file formats? This book has a recipe for you.
                  If anything, look through the TOC to see if there's anything that might be useful and chances are, you'll find it in this book.
                  I would definitely recommend this to anyone who uses Python or will be using it more in the future.

                  Disclaimer: I received an electronic version of this book because I am a part of the wonderful O'Reilly Blogger Review Program. These are just my opinions of the book.

                  (2 of 2 customers found this review helpful)

                   
                  5.0

                  Definitely a must

                  By boriel

                  from Santa Cruz de Tenerife, ES

                  About Me Developer, Sys Admin

                  Verified Reviewer

                  Pros

                  • Accurate
                  • Concise
                  • Easy to understand
                  • Helpful examples
                  • Well-written

                  Cons

                    Best Uses

                    • Expert
                    • Intermediate

                    Comments about oreilly Python Cookbook, 3rd Edition:

                    I considered myself an intermediate to expert pythonista, and this book taught me new and exciting techniques almost from the fist page.

                    It includes both python 2 and 3 idioms directly applicable to many common patterns I usually did in a suboptimal manner. Compiler and parsers, Python 2 & 3, networking, asynchronous and cooperative multitasking... and everything in a bunch of lines is something definitely recommended for everyone wanting to master python programming.

                    I started focusing on some recipes an ended up reading the book from beginning to end.

                    Note: This book might not be suitable for novice programmers or python learners.

                    Displaying reviews 1-10

                    Back to top

                    Previous | Next »

                     
                    Buy 2 Get 1 Free Free Shipping Guarantee
                    Buying Options
                    Immediate Access - Go Digital what's this?
                    Ebook:  $41.99
                    Formats:  DAISY, ePub, Mobi, PDF
                    Print & Ebook:  $54.99
                    Print:  $49.99