Python Cookbook: Recipes for Mastering Python 3If you need help writing programs in Python 3, or want to update older Python 2 code, this book is just the ticket. Packed with practical recipes written and tested with Python 3.3, this unique cookbook is for experienced Python programmers who want to focus on modern tools and idioms. Inside, youâ??ll find complete recipes for more than a dozen topics, covering the core Python language as well as tasks common to a wide variety of application domains. Each recipe contains code samples you can use in your projects right away, along with a discussion about how and why the solution works. Topics include:
|
Contents
Chapter 1 Data Structures and Algorithms | 1 |
Chapter 2 Strings and Text | 37 |
Chapter 3 Numbers Dates and Times | 83 |
Chapter 4 Iterators and Generators | 113 |
Chapter 5 Files and IO | 141 |
Chapter 6 Data Encoding and Processing | 175 |
Chapter 7 Functions | 217 |
Chapter 8 Classes and Objects | 243 |
Chapter 11 Network and Web Programming | 437 |
Chapter 12 Concurrency | 485 |
Chapter 13 Utility Scripting and System Administration | 539 |
Chapter 14 Testing Debugging and Exceptions | 565 |
Chapter 15 C Extensions | 597 |
Appendix A Further Reading | 665 |
667 | |
About the Authors | 688 |
Other editions - View all
Common terms and phrases
actually allows alternative applied args arguments array attribute base byte callback characters checking client collections common connection consider contains create data structures decorator def __init__(self defined definition descriptor dictionary Discussion double encoding error example exception execute extension File stdin filename format function handling implementation import instance interpreter involving iteration kind kwargs logging look match memory method module multiple node normal object operations optional output package pass pattern perform Point possible Problem Problem You want PyObject Python queue raise recent call last recipe result sequence server shown simple socket Solution spam specific statement string structure task thread Traceback most recent True tuple variable write yield