Errata

Architecture Patterns with Python

Errata for Architecture Patterns with Python

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
PDF Page Chapter 11, Section 'Our New Outgoing Event', Page 171
Last paragraph

In chapter 10, HANDLERS dictionary is transformed to two dictionaries: COMMAND_HANDLERS and EVENT_HANDLERS.
On this page, HANDLERS is used again. It should be changed to EVENT_HANDLERS.
Chapter 11 branch on Github confirms this.

Mojtaba Mir Yaghoobzadeh  May 06, 2023 
Printed Page Validating Semantics
whole section

hello, this is my favorite book of all time, i need clarification about validating, in here product not found is consider validating semantic but the message product_id is correct, so the data is meaningful, but in that current state of domain model this product id not found so i think it is more pragmatic validation than semantic validation, and also the semantic validation is more like domain concern because it protect against invariant, but in the book semantic validation is consider job of service layer. and i think pragmatic validation is job of service layer as it should be check in the context of the domain but in the book it consider job of domain layer.

Hamzeh Pourmahdi  Oct 20, 2025 
Printed Page 14
test code in the middle of the page

In the test_allocation_is_idempotent() function
I think the batch.allocate(line) called accidentally twice
either remove one call or change the assert to 16

Kostas Vogiatzis  Jun 26, 2022 
Printed, O'Reilly learning platform, Other Digital Version Page 17
code at top of page

This is STILL NOT fixed in the online version despite the claim you made otherwise on the report by Tom Huibregtse. This code is copied from the online version.

class Money(NamedTuple):
currency: str
value: int

fiver = Money('gbp', 5)
tenner = Money('gbp', 10)

def can_add_money_values_for_the_same_currency():
assert fiver + fiver == tenner

def can_subtract_money_values():
assert tenner - fiver == fiver

Chuck  Jan 20, 2025 
Printed Page 28
Top of page, orm.py class OrderLine

-qty = Integer(String(250))
+qty = Column(Integer())

The line was probably copied from the previous line for 'sku' but insted of changing 'String' into 'Integer' 'Column' was replaced by mistake.

Philipp Hahn   Jan 22, 2023 
Printed Page 49
Code example

At the beginning of the method, a variable named source_hashes is created. A few lines down, it referred to as src_hashes. Not a big deal, but it did throw me off for a second.

Sandeep Gill  May 02, 2022 
Mobi Page 199
Exercise for the reader: class FakeMessageBus()

self.handlers = …
Instance attribute handlers should be capitalized for the parent class‘ method „handle()“ to work:
self.HANDLERS = …

Christopher Graf  Jan 29, 2022 
Mobi Page 246
Box: Rebuilding from scratch

„add_allocate_to_read_model“ should be „add_allocation_to_read_model“

Christopher Graf  Jan 30, 2022