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:
|
Other editions - View all
Common terms and phrases
__init__ __init__.py __main__ __name__ args array attribute base class binary byte strings callback function class definition client clsname coroutines create data structures datetime decorator def __init__(self def def def init_(self default defined described in Recipe dictionary Discussion encoding example execute file descriptor File stdin filename finder format fullname functools import grok gzip handler Here’s implementation import sys input instance involving iteration JSON keyword arguments kwargs lambda look match metaclass method mixin mmap module multiple multiprocessing namespace node numpy object operations optional output package parsing pass class pattern perform Problem You need Problem You want Python queue recent call last recursion regular expression result self.name sequence server simple SOCK_STREAM socket import Solution spam specific statement sys.path Traceback most recent True tuple TypeError Unicode unpack variables visitor pattern write code WSGI XML-RPC yield