Gotchas of early-bound function argument defaults in Python

from blog Redowan's Reflections, | ↗ original
I was reading a tweet about it yesterday and that didn’t stop me from pushing a code change in production with the same rookie mistake today. Consider this function: # src.py from __future__ import annotations import logging import time from datetime import datetime def log( message: str, /, *, level: str, timestamp: str =...