When should default function arguments be evaluated?
I was writing my first app and I found a bug. The date time column in my database always had the same value. I found out that this value changed upon restarting the server.
This was the problematic piece of code:
def foo(param, now=datetime.now()):...
Β·2 min readΒ·rahem027.hashnode.devUpdated Read the article
Sean Charles
Welcome to the Python club dude!
docs.python-guide.org/writing/gotchas