-
Notifications
You must be signed in to change notification settings - Fork 33
Labels
Description
There is a lingering datetime.utcnow() in the section about mutable objects as function's arguments:
from datetime import datetime
def log(msg, *, dt=datetime.utcnow()):
print(f"{dt}: {msg}")Should be:
from datetime import datetime, UTC
def log(msg, *, dt=datetime.now(UTC)):
print(f"{dt}: {msg}")