27 Jul
2020
27 Jul
'20
7:50 p.m.
On 27.07.20 16:01, Peter Moore wrote:
I have had a long standing unanswered question on on stackoverflow: is it possible to pass a function to a default parameter so that you could do in essence things like this.
def time_diff(target_time, curr_time= lambda : datetime.now() ): return curr_time - target_time
There was a discussion about this topic recently: https://mail.python.org/archives/list/python-ideas@python.org/thread/MILIX6H...