Ok Enrico, più avanti guarderò il modulo che mi suggerisci, ma per ora desidero capire. Io scrivo: import datetime a = datetime.time(1,30,40)
Ok, quindi a adesso è un oggetto datetime.time. Adesso creo un delta da sommare: b = datetime.timedelta(seconds=125) Poi scrivo: a+b Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for +: 'datetime.time' and 'datetime.timedelta' >>> Perché, non dovrebbe esattamente servire a quello il timedelta? Se b lo creo come altro oggetto tempo: b=datetime.time(0,2,5) E poi: a+b Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for +: 'datetime.time' and 'datetime.time' >>> Ma allora come faccio a fare le operazioni sul tempo? GB. _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python