Read updated version for free at
powerfulpython.com/book
"Feels like Neo learning Jiu jitsu in the Matrix." - John Beauford (@johnbeauford)
This is the 2nd edition of Powerful Python. I have started to update
the book for the 3rd edition. You can read that work in progress at
powerfulpython.com/book .
"I just wanted to let you know what an excellent book this is... I keep going back to your book to learn Python." - Fahad Qazi, London, UK
"Thanks. Keep up the good work. Your chapter on decorators is the best I have seen on that topic." - Leon Tietz, Minnesota, USA
"Powerful Python is already helping me get huge optimization gains." - Timothy Dobbins
"What have I found good and valuable about the book so far?Everything honestly. The clear explanations, solid code examples have really helped me advance as a Python coder... Thank you! It has really helped me grasp some advanced concepts that I felt were beyond myabilities." - Nick S., Colorado, USA
For data scientists, back-end engineers, web developers, sysadmins, devops, QA testers and more.
Author(s): Aaron Maxwell
Edition: 2
Publisher: Powerful Python Press
Year: 2017
Language: English
Pages: 220
Doing More with Python
Python Versions
Python Application Environments
Python Package Management
Scaling With Generators
Iteration in Python
Generator Functions
Generator Patterns and Scalable Composability
Python is Filled With Iterators
The Iterator Protocol
Creating Collections with Comprehensions
List Comprehensions
Formatting For Readability (And More)
Multiple Sources and Filters
Comprehensions and Generators
Dictionaries, Sets, and Tuples
Limits of Comprehensions
Advanced Functions
Accepting & Passing Variable Arguments
Functions As Objects
Key Functions in Python
Decorators
The Basic Decorator
Data In Decorators
Decorators That Take Arguments
Class-based Decorators
Decorators For Classes
Preserving the Wrapped Function
Exceptions and Errors
The Basic Idea
Exceptions Are Objects
Raising Exceptions
Catching And Re-raising
The Most Diabolical Python Anti-Pattern
Classes and Objects: Beyond The Basics
Quick Note on Python 2
Properties
The Factory Patterns
The Observer Pattern
Magic Methods
Rebelliously Misusing Magic Methods
Automated Testing and TDD
What is Test-Driven Development?
Unit Tests And Simple Assertions
Fixtures And Common Test Setup
Asserting Exceptions
Using Subtests
Final Thoughts
String Formatting
Replacing Fields
Number Formats (and "Format Specs")
Width, Alignment, and Fill
F-Strings
Percent Formatting
Logging in Python
The Basic Interface
Configuring The Basic Interface
Passing Arguments
Beyond Basic: Loggers
Log Destinations: Handlers and Streams
Logging to Multiple Destinations
Record Layout with Formatters
What’s Next?