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

Dear fellow Python fan, How would you like to Ace your Python interviews, ​Spend much less time debugging, and ​Be known

131 49

English Pages 342 Year 2017

Report DMCA / Copyright

DOWNLOAD FILE

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

Table of contents :
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?

Polecaj historie