STINNER Victor <victor.stin...@haypocalc.com> added the comment: It looks like it's not possible to choose between float and (int, int) output type for datetime.totimestamp(). One is more practical (and enough for people who doesn't need an exact result), and one is needed to keep the same resolution than the datetime object. I think that we can add two methods: * datetime.totimestamp()->float * datetime.totimestamptuple()->(int,int)
I choosed the shortest name for float because I suppose that most users prefer float than a tuple, and so the API is symmetrical: * datetime.fromtimestamp(float)->datetime * datetime.totimestamp()->float My patch have to be updated to use the timezone (and the DST thing?) and also to update the Python implementation. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2736> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com