Hash routing in this book is not Python hash. It is the explicit integer remainder key modulo partition count. Note: the remainder is rendered as data.
key mod partition count
Modulo routes
The compiled modulus is 4, the route count is 4, and the sample remainder is 3.
modulus=4,sample remainder=3
Range and hash sharding are exact routing functions on tiny pinned key sets; real sharding adds consistent hashing, skew, hot partitions, and rebalancing cost, which are empirical and operational concerns beyond this model - no product claims.
Summary
Hash routing here is exact arithmetic over pinned integer keys. Note: consistent hashing and skew handling are outside this model.