Dive into Python 3 will cover Python 3 and its differences from Python 2. Compared to the original Dive into Python, it will be about 50% revised and 50% new material.
I will publish drafts online as I go. The final book will be published on paper by Apress. The book will remain online under the CC-BY-3.0 license.
Below is the draft table of contents. There is no text yet.
Yes, that is PapayaWhip. All hail PapayaWhip.
Your first Python program
Declaring functions
How Python's datatypes compare to other programming languages
Everything is an object
The import search path
What's an object?
Native Python datatypes
Lists
Differences from Python 2
Creating new a list
Modifying a list
Searching a list
Deleting elements from a list
List operators
Looping through a list (list comprehensions)
Tuples
Dictionaries
Differences from Python 2
Creating a new dictionary
Modifying a dictionary
Deleting items from a dictionary
Looping through a dictionary (dictionary comprehensions)
Dictionary views
Sets
Differences from Python 2
Creating a new set
Modifying a set
Deleting elements from a set
Common set operations: union, intersection, and difference
Frozen sets
Numbers
Differences from Python 2
Integers
Long integers
Floating point numbers
Complex numbers
Common numerical operations
Strings
There ain't no such thing as "plain text"
A brief history of character encoding
What's a character?
How strings are stored in memory
Converting between different character encodings
Differences from Python 2
Historical note on the string module
The power of introspection
Using optional and named arguments
Keyword-only arguments
Using type, str, dir, and other built-in functions
The type function
The str function
Built-in functions
Getting object references with getattr
getattr with modules
getattr as a dispatcher
The peculiar nature of and and or
Using the and-or trick
Using lambda functions
Real-world lambda functions
Objects and object-orientation
...major changes afoot...
Files
Close your files... or don't
Regular expressions
Case study: street addresses
Case study: Roman numerals
Checking for thousands
Checking for hundreds
Using the {n,m} syntax
Checking for tens and ones
Verbose regular expressions
Case study: parsing phone numbers
HTML processing
html5lib
Installing html5lib
Using html5lib
Extracting data from HTML documents
XML Processing
...major changes afoot...
Scripts and streams
...will be folded into other chapters...
HTTP web services
How not to fetch data over HTTP
Features of HTTP
User-Agent
Redirects
Last-Modified/If-Modified-Since
ETag-If-None-Match
Compression
Differences from Python 2
httplib2 (note: needs port)
Installing httplib2
Why httplib2 is better than http.client
Debugging HTTP web services
Handling Last-Modified and ETag
SOAP web services
...no one will miss you...
Unit testing
Introduction to Roman numerals
Refactoring your code
Handling changing requirements
Functional programming
...bits and pieces will be folded into other chapters...
Metaclasses
...once I figure out WTF metaclasses are...
Performance tuning
Optimizing regular expressions
Optimizing dictionary lookups
Optimizing list operations
Optimizing string manipulation
Migrating old code to Python 3
Things the 2to3 tools won't catch
Case study: feedparser
Just shoot me
Creating graphics with the Python Imaging Library
Packaging Python libraries
A brief history of packaging (and why it's harder than you think)
Platform-specific packaging
Packaging by Linux distributions
Py2exe
Psyco
Where to go from here
Tentative because most of these have not been ported to Python 3 yet.