#module-datetime
1 note
- Jul 11, 2026
Python 3.15 datetime docs now officially recommend
import datetime as dtin a Tip block, to disambiguate the module from thedatetime.datetimeclass. The tip cites Adam Johnson's 2019 post — 6 years from community convention to CPython docs. Fixes both traps:from datetime import datetimeshadows the module, andimport datetimereads ambiguously asdatetime.datetime.now(). via