[issue6020] Create a datetime.timedelta.totalseconds property

2009-05-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> duplicate status: open -> closed superseder: -> datetime.timedelta is inconvenient to use... ___ Python tracker ___ ___

[issue6020] Create a datetime.timedelta.totalseconds property

2009-05-14 Thread Matthew Wilson
New submission from Matthew Wilson : I do this kind of thing a lot: >>> from datetime import timedelta >>> td = timedelta(days=2, seconds=14) >>> total_duration_in_seconds = td.days * 24 * 60 * 60 + td.seconds I would like to have a property on the timedelta object do this for me. -- c