[Python-ideas] datetime.timedelta literals

Jacco van Dorp j.van.dorp at deonet.nl
Tue Jun 5 07:56:21 EDT 2018

i'd also be pretty simple to implement....

Just list:
minute = timedelta(minutes=1)
hour = timedelta(hours=1)

and you could import and use them like that. Or if you really want to
write 5*m, the just from datetime import minute as m

More information about the Python-ideas mailing list