Janus Wool - Shop now

Fluent Python: Clear, Concise, and Effective Programming

2nd Edition
ISBN-13: 978-1492056355, ISBN-10: 1492056359
4.6 on Goodreads
(1,752)
Double-tap to zoom
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Purchase options and add-ons

Shipped & Sold by
Amazon.com
Amazon.com
Shipped & Sold by
Amazon.com
Returns
FREE 30-day refund/replacement
FREE 30-day refund/replacement
This item can be returned in its original condition for a full refund or replacement within 30 days of receipt.
Read full return policy
Payment
Secure transaction
Your transaction is secure
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Book details

Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Don't waste time bending Python to fit patterns you've learned in other languages. Python's simplicity lets you become productive quickly, but often this means you aren't using everything the language has to offer. With the updated edition of this hands-on guide, you'll learn how to write effective, modern Python 3 code by leveraging its best ideas.

Discover and apply idiomatic Python 3 features beyond your past experience. Author Luciano Ramalho guides you through Python's core language features and libraries and teaches you how to make your code shorter, faster, and more readable.

Complete with major updates throughout, this new edition features five parts that work as five short books within the book:

  • Data structures: Sequences, dicts, sets, Unicode, and data classes
  • Functions as objects: First-class functions, related design patterns, and type hints in function declarations
  • Object-oriented idioms: Composition, inheritance, mixins, interfaces, operator overloading, protocols, and more static types
  • Control flow: Context managers, generators, coroutines, async/await, and thread/process pools
  • Metaprogramming: Properties, attribute descriptors, class decorators, and new class metaprogramming hooks that replace or simplify metaclasses

About the Author

Luciano Ramalho is a Principal Consultant at ThoughtWorks and a fellow of the Python Software Foundation. He's been using Python professionally since 1998, deploying it in some of the largest Internet properties based in Brazil, as well as financial and government institutions. Ramalho has presented Python talks and tutorials in six countries, including events like PyCon US, OSCON, Python Brasil, PyBay, and PyCaribbean. He is co-owner of Python.pro.br, a training company.

About the author

Follow authors to get new release updates, plus improved recommendations.
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Luciano Ramalho was a Web developer before the Netscape IPO in 1995, and switched from Perl to Python in 1998. He has presented talks at PyCon US, OSCON, QCon, PythonBrasil, PyCon DE etc. Ramalho is a fellow of the Python Software Foundation and co-founder of Garoa Hacker Clube, the first hackerspace in Brazil. He is a Principal Consultant at Thoughtworks.

Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

From the brand

Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

From the Publisher

Fluent Python

From the Preface

“Python is an easy to learn, powerful programming language.” Those are the first words of the official Python 3.10 tutorial. That is true, but there is a catch: because the language is easy to learn and put to use, many practicing Python programmers leverage only a fraction of its powerful features.

An experienced programmer may start writing useful Python code in a matter of hours. As the first productive hours become weeks and months, a lot of developers go on writing Python code with a very strong accent carried from languages learned before. Even if Python is your first language, often in academia and in introductory books it is presented while carefully avoiding language-specific features.

As a teacher introducing Python to programmers experienced in other languages, I see another problem that this book tries to address: we only miss stuff we know about. Coming from another language, anyone may guess that Python supports regular expressions, and look that up in the docs. But if you’ve never seen tuple unpacking or descriptors before, you will probably not search for them, and you may end up not using those features just because they are specific to Python.

This book is not an A-to-Z exhaustive reference of Python. Its emphasis is on the language features that are either unique to Python or not found in many other popular languages. This is also mostly a book about the core language and some of its libraries. I will rarely talk about packages that are not in the standard library, even though the Python package index now lists more than 60,000 libraries, and many of them are incredibly useful.

Who This Book Is For

This book was written for practicing Python programmers who want to become proficient in Python 3. I tested the examples in Python 3.10—most of them also in Python 3.9 and 3.8. When an example requires Python 3.10, it should be clearly marked.

If you are not sure whether you know enough Python to follow along, review the topics of the official Python tutorial. Topics covered in the tutorial will not be explained here, except for some features that are new.

Who This Book Is Not For

If you are just learning Python, this book is going to be hard to follow. Not only that, if you read it too early in your Python journey, it may give you the impression that every Python script should leverage special methods and metaprogramming tricks. Premature abstraction is as bad as premature optimization.

Product information

Publisher O'Reilly Media
Publication date May 10, 2022
Edition 2nd
Language ‎English
Print length 1012 pages
ISBN-10 1492056359
ISBN-13 978-1492056355
Item Weight ‎2.31 pounds
Dimensions 7 x 2 x 9.25 inches
Best Sellers Rank