Dead Simple Python

Idiomatic Python for the Impatient Programmer
by Jason C. McDonald
October 2022, 752 pp.
ISBN-13: 
9781718500921
Covers Python 3.x

Download Chapter 5: VARIABLES AND TYPES

Look Inside!

Dead Simple Python back coverDead Simple Python spreadDead Simple Python spreadDead Simple Python spreadDead Simple Python spreadDead Simple Python spread

Dead Simple Python is a thorough introduction to every feature of the Python language for programmers who are impatient to write production code. Instead of revisiting elementary computer science topics, you’ll dive deep into idiomatic Python patterns so you can write professional Python programs in no time.

After speeding through Python’s basic syntax and setting up a complete programming environment, you’ll learn to work with Python’s dynamic data typing, its support for both functional and object-oriented programming techniques, special features like generator expressions, and advanced topics like concurrency. You’ll also learn how to package, distribute, debug, and test your Python project.

Master how to:

  • Make Python's dynamic typing work for you to produce cleaner, more adaptive code.
  • Harness advanced iteration techniques to structure and process your data.
  • Design classes and functions that work without unwanted surprises or arbitrary constraints.
  • Use multiple inheritance and introspection to write classes that work intuitively.
  • Improve your code's responsiveness and performance with asynchrony, concurrency, and parallelism.
  • Structure your Python project for production-grade testing and distribution

The most pedantically pythonic primer ever printed, Dead Simple Python will take you from working with the absolute basics to coding applications worthy of publication.

Author Bio 

Jason C. McDonald is a software engineer, manager, speaker, and author of both fiction and nonfiction. You can usually find him haunting his local coffee shops.

Table of contents 
Introduction
Part 1: The Python Environment
Chapter 1: The Python Philosophy
Chapter 2: Your Workbench
Chapter 3: Syntax Crash Course
Chapter 4: Project Structure and Imports
Part 2: Essential Structures
Chapter 5: Variables and Types
Chapter 6: Functions and Lambdas
Chapter 7: Objects and Classes
Chapter 8: Errors and Exceptions
Part 3: Data and Flow
Chapter 9: Collections and Iteration
Chapter 10: Generators and Comprehensions
Chapter 11: Text IO and Context Managers
Chapter 12: Binary and Serialization
Part 4: Advanced Concepts
Chapter 13: Inheritance and Mixins
Chapter 14: Metaclasses and ABCs
Chapter 15: Inspection and Generics
Chapter 16: Asynchrony and Concurrency
Chapter 17: Threading and Parallelism
Part 5: Beyond the Code
Chapter 18: Packaging and Distribution
Chapter 19: Debugging and Analysis
Chapter 20: Testing and Profiling
Chapter 21: The Parting of the Ways
Appendix A: Special Attributes and Methods
Appendix B: Python Debugger (pdb) Commands
Glossary
Reviews 

"An invaluable resource for those looking to learn the fundamentals of the Python programming language. . . . Dead Simple Python is an ideal choice for Python beginners who want to quickly advance from the bare basics to production-level coding."
—Ben Lutkevich, TechTarget

"Definitely a book that any Python programmer NEEDS to have on [their] bookshelf!"
Full Circle Magazine

"Dead Simple Python is a must-have resource for anyone looking to master Python in a fast, efficient, and enjoyable manner. Jason C. McDonald's expertise, coupled with his clear and concise writing style, makes this book an invaluable addition to any programmer's library. Whether you're looking to build your first Python application or deepen your understanding of the language's intricacies, [this book] is sure to become an indispensable companion on your programming journey." 
—The Security Noob

"Makes a good starting point for those contemplating a serious Python effort and who need to start with the basics."
—Lee Teschler, Microcontroller Tips

"The book that anyone who wants to become an expert Python programmer should read. . . . I don't believe that anyone who works through the material in this book will fail to become a competent and confident Python coder. It is quite a fantastic book."
—Sandra Henry-Stocker, NetworkWorld

"Reasonably paced and clear. . . . I expect that I’ll refer to the book the next time I start a small Python project."
—Paul Floyd, ACCU

"I especially enjoyed the practical approach to getting started with developing code using tools like virtual environments. It's a hefty book coming in at almost 700 pages but definitely worth adding to your library."
Paul Ferrill, freelancer for a variety of magazines and websites

Extra Stuff 

You can find resources for the book on GitHub.

Listen to Jason's interviews on Talk PythonHanselminutes, and Programming Throwdown podcasts.

Updates 

View the latest errata.