Topic
Python
Material specific to Python, or illustrated with Python examples.
7 pages
Writing25 September 2026
Intentional Model Design
A model should express required fields, genuine absence, and distinct variants in its type. Python unions and C# records encode those promises, while boundaries check external values.
Chapter20 September 2017
Architecture Layers in Python
Structure communicates intent: strict layers from Domain Facade to Gateway, a public surface declared in the boundary __init__.py, and folder depth that marks each class's level of abstraction.
Chapter20 September 2017
Class Design in Python
Two kinds of class and why that separation holds, no inheritance for extension, and naming conventions for polymorphic types.
Chapter20 September 2017
Method Design in Python
Pure and autonomous methods, why public methods orchestrate rather than implement, consistent abstraction levels, and the split between actions and queries.
Chapter20 September 2017
Naming Conventions in Python
Naming a thing for what it is: variables named after their type, methods that state the domain outcome, and why inventing a fresh name at each site is where wrong names come from.
Chapter20 September 2017
Type Annotations in Python
Annotations as intent rather than decoration: None used deliberately, dictionaries kept out of method boundaries, and capability types that tell the truth.
Chapter20 September 2017
Validation and Exception Handling in Python
Lock the front door and the back doors, fail fast and visibly, exception messages that carry diagnostic context, and a logging policy that does not swallow failure.