Philosophy Summary

Make the common case simple, let the exceptional case be exceptional.

• Trust Python's exception system• Write code that works as both script and library• Explicit is better than implicit• Errors should never pass silently unless explicitly silenced• Fail fast in one-shot scripts, continue gracefully in long-running services• Use stdlib over regex when stdlib provides the functionality• Check existing project code for API usage before guessing method names

Use assertions and sentinel-check patterns

Prefer APIs that fail loudly over ones that silently do nothing. When a library provides both a checked and an unchecked removal/access, use the checked form: verify the precondition first (e.g. Index() before RemoveAt(), find() before erase()), so that a violated assumption aborts immediately at the call site rather than producing silent corruption downstream. Write your own assert or early-return guard for every assumption that “should never happen” — if it ever does, you want to know exactly where.