Extensively updated for Python 3.10 with new chapters on design patterns, scientific programming, machine learning, and interactive Python
Shape your scripts using key concepts like concurrency, performance optimization, asyncio, and multiprocessing
Learn how advanced Python features fit together to produce maintainable code
Description
Even if you find writing Python code easy, writing code that is efficient, maintainable, and reusable is not so straightforward. Many of Python’s capabilities are underutilized even by more experienced programmers. Mastering Python, Second Edition, is an authoritative guide to understanding advanced Python programming so you can write the highest quality code. This new edition has been extensively revised and updated with exercises, four new chapters and updates up to Python 3.10.
Revisit important basics, including Pythonic style and syntax and functional programming. Avoid common mistakes made by programmers of all experience levels. Make smart decisions about the best testing and debugging tools to use, optimize your code’s performance across multiple machines and Python versions, and deploy often-forgotten Python features to your advantage. Get fully up to speed with asyncio and stretch the language even further by accessing C functions with simple Python calls. Finally, turn your new-and-improved code into packages and share them with the wider Python community.
If you are a Python programmer wanting to improve your code quality and readability, this Python book will make you confident in writing high-quality scripts and taking on bigger challenges
Who is this book for?
This book will benefit more experienced Python programmers who wish to upskill, serving as a reference for best practices and some of the more intricate Python techniques. Even if you have been using Python for years, chances are that you haven’t yet encountered every topic discussed in this book. A good understanding of Python programming is necessary
What you will learn
Write beautiful Pythonic code and avoid common Python coding mistakes
Apply the power of decorators, generators, coroutines, and metaclasses
Use different testing systems like pytest, unittest, and doctest
Track and optimize application performance for both memory and CPU usage
Debug your applications with PDB, Werkzeug, and faulthandler
Improve your performance through asyncio, multiprocessing, and distributed computing
Explore popular libraries like Dask, NumPy, SciPy, pandas, TensorFlow, and scikit-learn
Extend Python's capabilities with C/C++ libraries and system calls
I know python at a decent level but I’m always looking for more books to pick up new ideas and ways of coding. Good book for my needs. Probably not the friendliest book for a total beginner.
Amazon Verified review
SamJan 20, 2024
1
The book is not well bonded at all
Amazon Verified review
MCFeb 10, 2023
5
I highly recommend this book for anyone wanting to level up their Python skills. The book is targeted towards the more experienced Python developer, but one might argue that there is always something to learn, at any stage. The author discusses several core topics, including dependencies and how to manage them, several implementations of virtual environments and why they’re useful, alternative Python interpreters and their advantages (personally, I favor ipython), and much, much more.One of my favorite chapters was when he walked through the Python style guide, which rules are important, and why they matter. Python was created with readability in mind, after all!I appreciated the thorough use of examples of the Pythonic ideology, and the reminder of best practices. New features, such as pattern matching were discussed as a powerful solution to some programming problems.A lot of topics are covered in this book: functional programming, decorators, documentation, testing and logging, debugging, asyncio, to name a few.I definitely recommend Mastering Python to anyone interested in bettering their skills as a Pythonista.
Amazon Verified review
Cliente AmazonDec 29, 2022
5
This book covers all that is needed to know in outstanding detail. It relates to issues that you can easily find day-by-day working with python. It shows a modern python approach that is commonly found in every company that uses python to create programs and, in my case, data pipelines.
Amazon Verified review
Amazon CustomerDec 23, 2022
5
As a computer engineer, I'm more familiar with programming in C than languages like Python or MATLAB. However, it's always helpful to understand how to use a language such as Python, since its applications are ubiquitous in any field of engineering and science. Thus, I was interested in what this book had to offer me; I felt fairly comfortable with Python, but I knew that there were areas where I could improve.This book has done an excellent job in helping me gain expertise in Python, beyond my existing proficiency in the language. It starts out with the basics, such as a environment setup, interpreters, syntax, and style. Then, it dives deep into specific tools and paradigms in Python. The book makes topics like functional programming, metaclasses, and more very accessible. The book doesn't just focus on Python specifics; it helps readers become better programmers in general, with chapters on testing, logging, and debugging. It also has more specialized chapters on topics such as asynchronous programming and multiprocessing, as well as connecting Python with low-level systems programming tools such as C/C++ and system calls.Overall, I found that the book has a broad depth of information to pull from. This makes it so that even experts in Python can learn something. It's written in a way that you can jump into whatever chapter is most interesting or applicable for you, with plenty of examples and code to help guide you. If you're a budding Python programmer, then I think that this book will do a fine job of taking you even further!
Rick van Hattem is an experienced programmer, entrepreneur, Stack Overflow veteran, and software/database architect with more than 20 years of programming experience, including 15 years with Python. He has extensive experience with high-performance architecture featuring large amounts of concurrent users and/or data. Rick has founded several start-ups and has consulted many companies, including a few Y Combinator start-ups and several large businesses
Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.
If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.
Please Note: Packt eBooks are non-returnable and non-refundable.
Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:
You may make copies of your eBook for your own use onto any machine
You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website?
If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:
Register on our website using your email address and the password.
Search for the title by name or ISBN using the search option.
Select the title you want to purchase.
Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title.
Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook?
If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
To view your account details or to download a new copy of the book go to www.packtpub.com/account
Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.
You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.
What are the benefits of eBooks?
You can get the information you need immediately
You can easily take them with you on a laptop
You can download them an unlimited number of times
You can print them out
They are copy-paste enabled
They are searchable
There is no password protection
They are lower price than print
They save resources and space
What is an eBook?
Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.
When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.
For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.