On Wed, 1 Feb 2012 10:35:08 +1000 Nick Coghlan <ncoghlan at 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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4