Python is a general-purpose programming language used in software development, automation, data processing, web services, and scripting. The transition from Python 2 to Python 3 introduced structural changes in syntax, standard library behavior, and core language design. Understanding these differences is essential for maintaining legacy systems and developing new applications with modern Python versions.
About the book
Dive Into Python 3 by Mark Pilgrim centers on Python 3 and clearly explains how it differs from Python 2. The text contains substantial new material compared to the earlier Dive Into Python, reflecting the redesign and updates introduced in Python 3.
The book is intended for readers who want a structured introduction to Python 3 while clarifying migration issues and updated language features. It assumes familiarity with general programming concepts. It is suitable for developers transitioning from Python 2 and for learners seeking a comprehensive guide to Python 3 fundamentals and advanced topics.
The work is freely licensed under the Creative Commons Attribution-ShareAlike 3.0 (CC-BY-SA-3.0) license and is available in HTML and PDF formats. The source code can also be obtained via a public Git repository.
What you will learn
Readers study core Python 3 language features, including native data types, comprehensions, string handling, regular expressions, closures, generators, classes, and iterators. The book also covers advanced iteration patterns, unit testing, and refactoring techniques.
In addition to language fundamentals, it addresses file handling, XML processing, object serialization, HTTP web services, and packaging Python libraries. A dedicated case study examines porting the chardet library to Python 3, offering insight into migration challenges.
The text also presents tools for porting code with 2to3, explains special method names, and includes troubleshooting guidance. These topics support both learning and applied development tasks in Python 3 environments.
Table of contents
- Dive Into Python 3
- What’s New in “Dive Into Python 3”
- Installing Python
- Your First Python Program
- Native Datatypes
- Comprehensions
- Strings
- Regular Expressions
- Closures & Generators
- Classes & Iterators
- Advanced Iterators
- Unit Testing
- Refactoring
- Files
- XML
- Serializing Python Objects
- HTTP Web Services
- Case Study: Porting chardet to Python 3
- Packaging Python Libraries
- Porting Code to Python 3 with 2to3
- Special Method Names
- Where to Go From Here
- Troubleshooting
Book details
- Title: Dive Into Python 3
- Author(s): Mark Pilgrim
- Main category: Programming
- Subcategory: Python
- Language: English
- License: Creative Commons Attribution-ShareAlike 3.0 (CC-BY-SA-3.0)**
More books in: Programming, Python
Legal notice: This book is shared for educational purposes only. The content is distributed under Creative Commons licenses or with explicit permission from the author. FreeProgrammingBooks may host files that comply with their respective licenses.