
Desertcart purchases this item on your behalf and handles shipping, customs, and support to Morocco.
Use advanced features of Python to write high-quality, readable code and packages Key Features 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 Book 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 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 Who this book is 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 Table of Contents Getting Started – One Environment per Project Interactive Python Interpreters Pythonic Syntax and Common Pitfalls Pythonic Design Patterns Functional Programming – Readability Versus Brevity Decorators – Enabling Code Reuse by Decorating Generators and Coroutines – Infinity, One Step at a Time Metaclasses – Making Classes (Not Instances) Smarter Documentation – How to Use Sphinx and reStructuredText Testing and Logging – Preparing for Bugs Debugging – Solving the Bugs Performance – Tracking and Reducing Your Memory and CPU Usage asyncio – Multithreading without Threads Multiprocessing – When a Single CPU Core Is Not Enough Scientific Python and Plotting Artificial Intelligence Extensions in C/C++, System Calls, and C/C++ Libraries Packaging – Creating Your Own Libraries or Applications Review: Hake your python skills to the next level. - If you are an intermediate python programmer I think "Mastering Python" from Rick Van Hattem could be a great addition to your library. After have programming for a few years my skills got to the point where you can solve most problems I came across, but I still felt like I wanted to learn more complicated concepts and wanted to write code that was more efficient. One area that I wanted to learn more about and multiprocessing and multi threading, Rick Van Hattem did a really nice job approaching this concept, much better than what I have read on the the internet. This book should be able to take your python skills to the next level. In addition to that I really enjoyed his explanation of classes, structures, decorators, generators, and coroutines. In case you need a refresher on environments or dependencies and other basic concepts the book also has you covered. That being said if you are new to python programming, I am not sure this would be my 1st book to purchase, it might be a little overwhelming give it has 700 pages of content. If you want to improve you knowledge and skills this is a nice book to have in your library. Review: Covers most of the topics ( basic and advance ) - Overall amazing combination of all the content in a single book for python. It is quite comprehensive. It gives a brief idea with examples which he starts from environment/package management, to docstrings, list, set and dict, hinting and testing, and many more. If you are a recent graduate or have started working on python recently, then you have lots to learn from this book in systematic format. Even if you have worked for around 3+ years in python this book will teach you some of the most basic tricks which will be helpful in day to day coding and shortening the code. This book has a chapter for machine learning for those folks who want to get some help in ML and Python coding. Overall this book is nice and would provide good information for new grads and someone with 3-4+ years of python exp.

| Best Sellers Rank | #2,320,288 in Books ( See Top 100 in Books ) #158 in Functional Software Programming #1,990 in Python Programming #3,209 in Software Development (Books) |
| Customer Reviews | 4.6 out of 5 stars 74 Reviews |
D**G
Hake your python skills to the next level.
If you are an intermediate python programmer I think "Mastering Python" from Rick Van Hattem could be a great addition to your library. After have programming for a few years my skills got to the point where you can solve most problems I came across, but I still felt like I wanted to learn more complicated concepts and wanted to write code that was more efficient. One area that I wanted to learn more about and multiprocessing and multi threading, Rick Van Hattem did a really nice job approaching this concept, much better than what I have read on the the internet. This book should be able to take your python skills to the next level. In addition to that I really enjoyed his explanation of classes, structures, decorators, generators, and coroutines. In case you need a refresher on environments or dependencies and other basic concepts the book also has you covered. That being said if you are new to python programming, I am not sure this would be my 1st book to purchase, it might be a little overwhelming give it has 700 pages of content. If you want to improve you knowledge and skills this is a nice book to have in your library.
R**I
Covers most of the topics ( basic and advance )
Overall amazing combination of all the content in a single book for python. It is quite comprehensive. It gives a brief idea with examples which he starts from environment/package management, to docstrings, list, set and dict, hinting and testing, and many more. If you are a recent graduate or have started working on python recently, then you have lots to learn from this book in systematic format. Even if you have worked for around 3+ years in python this book will teach you some of the most basic tricks which will be helpful in day to day coding and shortening the code. This book has a chapter for machine learning for those folks who want to get some help in ML and Python coding. Overall this book is nice and would provide good information for new grads and someone with 3-4+ years of python exp.
F**D
Build more skills!
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.
C**R
Needs a few things, otherwise perfect
The book has has an excellently laid out structure. Although, it does say that the book is not for beginners, I feel like it is - which is a good thing as more people would be able to understand the book. The content covered seems comprehensive and it is well written. Topics covered are highly useful for someone starting python. That being said, I also have some concerns. The book sometimes tends to use redundant words - again not a bad thing. For example, in the numpy chapter, I read something like “numpy.ndarray object is implemented in C and offers a very fast and memory-efficient array. It can be represented as a single-dimension array or a multi-dimensional matrix ”. We already established the fact that numpy is fast and is written in C, why would you repeat it again for a function of numpy? Another thing, if you look at it, arrays are always single dimension. The moment we add one more dimension to an array, it becomes a matrix and similarly, a single dimension matrix is nothing but an array. In mathematics, we tend to treat things as matrices and vectors - so I can essentially treat vectors as arrays in python - if you get the idea. Now, this is not a bad thing because, beginners might not be knowing this - so although this seems to be extra information - it’s in good taste. I also noticed that the book sometimes over-explains some topics like one above and sometimes under-explains a topic. For example for the same numpy chapter, There is a point where the book says, calculations on matrices is much faster/efficient. My question is why is it so? Other than these small caveats (which probably won’t change anything from a reader’s perspective), the book is very good. Only thing, I didn’t like is that how the book handles the ML/AI chapters. It’s not the worst thing I’ve seen, but it’s certainly not the best. The book relies on definitions and code without talking about the underlying mathematics. You can’t just completely obliterate all the mathematics, even if the book was for beginners. There’s no machine learning without mathematics and if you’re covering it, you should cover numerical algebra and probability theory. For the most part, I feel like this AI/ML chapter could be a completely different book, but that’s just my opinion - the book provides a good enough introductory code but again, unfortunately, I don’t like it. There are few more small things which might make this book seem unpolished, but I think I have already said too much and most of those things would be considered nitpicking, I guess. So, in conclusion, the book is great, great insights, well structured and comprehensive. A few things here and there can be touched upon and they can make it perfect.
S**N
Not for Python beginners, but definitely useful for anyone with intermediate or better Python skills
I had never used virtual environments for Python projects, so this book's first chapter gave me a headache trying to figure out which of several approaches to take and what might be the best way to manage and track dependencies. It was a case of being shown too much too soon for someone who was expecting an easier, calmer entrance into intermediate and higher-level Python. However, once I got past that intimidating first chapter, I quickly started finding many topics and code examples that are helping me improve my capabilities. (Actually, Chapter 1 also helped me, even if it did give me a headache. I settled on Anaconda and was able to set up virtual environments that are working as described.) I now rate this book as a solid "keeper" for my library and definitely recommend it to others who want to up their Python game. The writing is clear, and the mostly short code examples adequately and clearly illustrate the author's points. The examples also can be good starting points for trying out your own variations and seeing what works or what blows up. "Mastering Python Second Edition" is hefty, spanning some 680 pages. But that makes room even for some focus on obscure but useful functions such as *compress*, which "applies a Boolean filter to your iterable, making it return only the elements you actually need." The author's explanations of list, dict, set, and generator comprehensions have proved enlightening for me, and--grabbing at another random example--so has using *mpmath* for "convenient, precise calculations" involving trigonometry, calculus, matrices, and other operators. (My math skills are far from the best, so good help is always needed!) And, while doing some tests, it's good to know that "when measuring the execution time of a code snippet, there will always be some variation present." It will take me a while to work my way through all of the chapters and topics--and the numerous "try to" exercises (with answers posted on GitHub). Nonetheless, "Mastering Python" already has introduced me to a wide array of packages, tools, and topics that are helping me raise my capabilities, including functional programming style, testing, debugging, and working with scientific Python and plotting. My thanks to Packt Publishing for sending me a review copy to consider. This is a solid and comprehensive guide to producing better, more effective code using Python's wide-ranging capabilities, libraries, and tools.
M**D
A comprehensive cookbook that will deepen and broaden your Python skills
The second edition of Mastering Python is a hefty beast weighing in at 18 chapters and around 600 pages of content. It covers a wide range of topics in Python including philosophy, advanced class design, performance, multithreading, documentation, testing, and specialized uses of Python for data science and AI. This is a book that's going to best help two types of people: - If you're a few years in on Python and want to see what else the language can do, this book is going to push you to new heights - If you're coming to Python from another programming language, this will help you transfer your skills and knowledge by frequently relating concepts to concepts in other languages and orienting you to the Pythonic way of doing things. As an expert .NET developer expanding my knowledge into Python, I fall firmly into the second profile. I learned many new aspects of Python from reading this book. Additionally, in the data science areas where I'm strongest in Python, the book surprised me by introducing me to a library or two I hadn't heard of (and now plan on using in my next project). However, this is not a book for everyone. If you are starting out in Python, this book is too advanced for you and skips covering the basics of the Python language in lieu of a focus on more advanced areas. Start with other books, courses, and projects, then come back to this book. My only gripes with the book are that many of the code samples are screenshots with white text on black backgrounds. On my printing this was fine, but it could lead to misprints. I also would have liked to have seen one or two quiz style questions at the end of each chapter to help cement concepts, but the book is already long enough. This is a book at has earned its place on my bookshelf as a reference book as I continue to drill deeper into Python. I definitely recommend it, and encourage you to read it in random order in the areas most of interest to you.
R**N
A tour de force of proper pythonic programming!
This book is for EVERYONE who wishes to learn the best ways to use python. It starts you off with the basics of environment setup, stressing how we use a different environment for each projects which makes it possible to use several different versions of the same library without any clashes. A must for anyone programming in python. It then goes over how to manage dependencies properly, which python does wonderfully with the different package managers it uses. It gets into pythonic syntax and how it differs from other languages. It really does a great job at showing through example after example of how to properly write good python code. It also covers many of the common pitfalls that many new and even experienced python programmers face and shows you how to not fall into these traps. It gets into many design patterns, talks about functional programming, brings us through how to use features such as decorators to make our code super charged with some of the best aspects of the python language. I mean this book really covers it all, getting into things like python generators, which is one of my favorite features of using python, as it really helps you to write clean and efficient code when used properly. In addition to all this it goes into topics like testing, debugging, and performance optimizations, as well as how to properly document using some amazing tools like Sphinx. As well each section finishes with some exercises to help you solidify what you have learned. I did many of these and found the exercises to be great at reinforcing everything I was learning. All the examples of the code throughout the book are available on GitHub as well, which makes it easy to follow along and try the examples out without having to retype everything from scratch. All in all this is a great book and I recommend it for anyone who is going to be using python. I am sure regardless of how much experience you already have or how little you have, there is something in this book for you.
A**R
This book will help take you to the next level in Python!
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!
B**I
Buon testo con esempi sulle nuove caratteristiche di Python 3.10
Mastering Python, 2nd ed. (Seconda edizione, lingua Inglese) L’AUTORE e IL LIBRO: L'autore da Rick van Hattem è raggiungibile nel canale Discord dedicato al libro e in questa seconda edizione il libro edito da Packt Publishing è incentrato nella presentazione dei concetti avanzati e offre esempi chiari e ben documentati. L’introduzione “Usa le funzionalità avanzate di Python per scrivere codice e pacchetti leggibili e di alta qualità” dai più smaliziati potrebbe essere colto come una raccolta di esempi di soluzioni, lo è ed è molto comodo. Il centro del libro sono le novità di Python 3.10, ed è dettagliatamente descritto nei minimi particolari, con esempi commentati e spesso calati nella realtà di un programmatore. Quindi nella versione elettronica potrà essere una ottima fonte di soluzioni da cui prendere spunto. PER CHI È E PER CHI NON È? Mastering Python è una fonte di soluzioni e idee per chi sa già cosa desidera ottenere da Python nella release stabile più recente (siamo ancora alla 3.10.6). Le breve introduzioni e il codice commentato rendono tutto più semplice e più pratico. Il libro per quanto chiaro e bel strutturato, con crescendo di difficoltà, non è per chi si è appena affacciato al mondo della programmazione. Lo trovo più indicato a chi sa già programmare in altri linguaggi e vuole imparare Python con una curva di apprendimento corta. RICOMPREREI ALTRE EDIZIONI? Sì, per me questo libro vale i soldi spesi. Ho scelto la versione Kindle per la comodità di ricercarlo e poterlo leggere sia sui dispositivi che sul computer partendo dal sito leggi[.]amazon[.]it Il libro è disponibile sul sito dell’editore Packt Publishing oltre alla versione cartaceo anche in vari formati elettronici, tra cui pdf, epub… etc. SOMMARIO (liberamente tradotto): Capitolo 1: Un ambiente (virtuale) per il progetto Capitolo 2: Interpreti Python interattivi Capitolo 3: Sintassi Python e insidie comuni Capitolo 4: Pattern di progettazione Python Capitolo 5: Programmazione funzionale: leggibilità contro brevità Capitolo 6: Decoratori – Abilitazione del riutilizzo del codice decorando Capitolo 7: Generatori e Coroutine – L'infinito, un passo alla volta Capitolo 8: Metaclassi: rendere le classi (non le istanze) più intelligenti Capitolo 9: Documentazione – Come usare Sphinx e reStructuredText Capitolo 10: Test e log – Preparazione ai bug Capitolo 11: Debug – Risoluzione dei bug Capitolo 12: Prestazioni: monitoraggio e riduzione dell'utilizzo della memoria e della CPU Capitolo 13: asyncio – Multithreading senza thread Capitolo 14: Multiprocessing – Quando un singolo core della CPU non è sufficiente Capitolo 15: Uso di Python in ambito scientifico e grafici Capitolo 16: Intelligenza Artificiale Capitolo 17: Estensioni in C/C++, chiamate di sistema e librerie C/C++ Capitolo 18: Packaging – Creazione di librerie o applicazioni personalizzate
L**S
Muito bom
O livro é grande, mas tem uma leitura muito suave e rápida visto ter imensas referências que são boas para se conhecer mas não ser um especialista nelas. Uma excelente opção para guiar e moldar um developer Python com alguns anos de experiência. A qualidade da impressão é um bocado fraca.
P**R
Nothing is elaborated in the book
The book lacks depth, it gives you one page on NLTK, one page on Spacy, One page on gensim. Similarly for seaborn, bokeh, matplotlib, similarly for pytorch, sklearn and tensoflow... No topic is elaborated. The topics which are elaborated are useful but only if this is the only book which contained it A book like fluent python is much better choice. What i hated about the book about that, the code on black window. Sooner or latee the black ink will be going to stick on other page as well. There were no thought, on how to put the code on book. There is nothing power packed about the book. Useless, don't waste your money. Packt all the recent publications on python lacks depth. Please print something which has depth even if it contains 5 topics. The book has many topics but you can just read it, you can't try to make anything useful from the 2 paragraph introduction. I am sorry but not a useful book at all
S**M
It is not well bonded
The book is not well bonded at all
Trustpilot
3 weeks ago
2 months ago