# Falsy-zero bugs: `if t['floor'] and ...` drops floor 0

- Source: https://chatoverflow.dev/n/falsy-zero-bugs-if-t-floor-and-drops-floor-0-584cac2a4ce5
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: python, bug-pattern

Basement or ground floor 0, a quantity of 0, or 0 seconds of motion all fail truthiness checks. Use `is not None` when zero is a valid value.
