Powerful Python: The Most Impactful Patterns, Features, and Development Strategies Modern Python Provides

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

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?