Book description
You've learned the basics of Python, but how do you take your skills to the next stage? Even if you know enough to be productive, there are a number of features that can take you to the next level in Python. Pro Python explores concepts and features normally left to experimentation, allowing you to be even more productive and creative.
In addition to pure code concerns, Pro Python will develop your programming techniques and approaches, which will help make you a better Python programmer. Not only will this book help your code, it will also help you understand and interact with the many established Python communities, or even start your own.
Take your Python knowledge and coding skills to the next level.
Write clean, innovative code that will be respected among your peers.
Make your code do more with introspection and metaprogramming.
Design complete frameworks and libraries (two are included in the book!).
Table of contents
- Copyright
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Introduction
-
1. Principles and Philosophy
-
1.1. The Zen of Python
- 1.1.1. Beautiful Is Better Than Ugly
- 1.1.2. Explicit Is Better Than Implicit
- 1.1.3. Simple Is Better Than Complex
- 1.1.4. Complex Is Better Than Complicated
- 1.1.5. Flat Is Better Than Nested
- 1.1.6. Sparse Is Better Than Dense
- 1.1.7. Readability Counts
- 1.1.8. Special Cases Aren't Special Enough to Break the Rules
- 1.1.9. Although Practicality Beats Purity
- 1.1.10. Errors Should Never Pass Silently
- 1.1.11. Unless Explicitly Silenced
- 1.1.12. In the Face of Ambiguity, Refuse the Temptation to Guess
- 1.1.13. There Should Be One—and Preferably Only One— Obvious Way to Do It
- 1.1.14. Although That Way May Not Be Obvious at First Unless You're Dutch
- 1.1.15. Now Is Better Than Never
- 1.1.16. Although Never Is Often Better Than Right Now
- 1.1.17. If the Implementation is Hard to Explain, It's a Bad Idea
- 1.1.18. If the Implementation is Easy to Explain, It May Be a Good Idea
- 1.1.19. Namespaces Are One Honking Great Idea— Let's Do More of Those!
- 1.2. Don't Repeat Yourself
- 1.3. Loose Coupling
- 1.4. The Samurai Principle
- 1.5. The Pareto Principle
- 1.6. The Robustness Principle
- 1.7. Backward Compatibility
- 1.8. The Road to Python 3.0
- 1.9. Taking It With You
-
1.1. The Zen of Python
- 2. Advanced Basics
-
3. Functions
-
3.1. Arguments
- 3.1.1. Planning for Flexibility
- 3.1.2. Variable Positional Arguments
- 3.1.3. Variable Keyword Arguments
- 3.1.4. Combining Different Kinds of Arguments
- 3.1.5. Invoking Functions with Variable Arguments
- 3.1.6. Preloading Arguments
- 3.1.7. Introspection
- 3.1.8. Example: Identifying Argument Values
- 3.1.9. Example: A More Concise Version
- 3.1.10. Example: Validating Arguments
- 3.2. Decorators
- 3.3. Function Annotations
- 3.4. Generators
- 3.5. Lambdas
- 3.6. Introspection
- 3.7. Taking It With You
-
3.1. Arguments
- 4. Classes
- 5. Common Protocols
- 6. Object Management
- 7. Strings
- 8. Documentation
- 9. Testing
- 10. Distribution
- 11. Sheets: A CSV Framework
-
A. PEP 8: Style Guide for Python
- A.1. Introduction
- A.2. A Foolish Consistency is the Hobgoblin of Little Minds
- A.3. Code Layout
- A.4. Imports
- A.5. Whitespace in Expressions and Statements
- A.6. Comments
- A.7. Documentation Strings
- A.8. Version Bookkeeping
- A.9. Naming Conventions
- A.10. Programming Recommendations
- A.11. Copyright
- B. PEP 10: Voting Guidelines
- C. PEP 20: The Zen of Python
- D. PEP 257: Docstring Conventions
- E. PEP 387: Backwards Compatibility Policy
- F. PEP 3000: Python 3000
- G. PEP 3003: Python Language Moratorium
Product information
- Title: Pro Python
- Author(s):
- Release date: June 2010
- Publisher(s): Apress
- ISBN: 9781430227571
You might also like
book
Pro Python 3: Features and Tools for Professional Development
Refine your programming techniques and approaches to become a more productive and creative Python programmer. This …
book
Python Essentials
Modernize existing Python code and plan code migrations to Python using this definitive guide Learn the …
book
Pro Django, Second Edition
Learn how to leverage Django, the leading Python web application development framework, to its full potential …
book
Pro Python, Second Edition
You’ve learned the basics of Python, but how do you take your skills to the next …