News for hackers. Stuff that matters.
Re:Common Python Mistakes by arethuza on Thursday May 08, 2014 @11:21AM (#7715747)
Isn't that just now being bound to a different datetime object each time f is defined?
Re:Common Python Mistakes by mguillech on Thursday May 08, 2014 @11:40AM (#7715857)
Right, it's (re) defined every time you call 'foo2' but that's a different scenario than the one written in the article (hadn't you had 'foo2' and only 'foo' then you'd have the same time in all your calls to the function without supplying arguments).