On Wed, 1 Feb 2012 10:35:08 +1000 Nick Coghlan <ncogh...@gmail.com> wrote: > > With this approach, API usage might end up looking something like: > > >>> time.time() > 1328006975.681211 > >>> time.time(convert=time.as_float) > 1328006975.681211 > >>> time.time(convert=time.as_int) > 1328006979 > >>> time.time(convert=time.as_tuple) > (1328006975, 681211, -9) > >>> time.time(convert=decimal.Decimal.from_components) > Decimal('1328006983.761119000')
It strikes me as inelegant to have to do so much typing for something as simple as getting the current time. We should approach the simplicity of ``time.time(format='decimal')`` or ``time.decimal_time()``. (and I think the callback thing is overkill) Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com