A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-February/116494.html below:

[Python-Dev] PEP 410 (Decimal timestamp): the implementation is ready for a review

[Python-Dev] PEP 410 (Decimal timestamp): the implementation is ready for a review [Python-Dev] PEP 410 (Decimal timestamp): the implementation is ready for a reviewGregory P. Smith greg at krypto.org
Wed Feb 15 02:13:58 CET 2012
On Tue, Feb 14, 2012 at 5:13 PM, Gregory P. Smith <greg at krypto.org> wrote:
> On Tue, Feb 14, 2012 at 4:23 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> On Wed, Feb 15, 2012 at 8:29 AM, Barry Warsaw <barry at python.org> wrote:
>>> My primary concern with the PEP is adding to users confusion when they have to
>>> handle (at least) 5 different types[*] that represent time in Python.
>>
>> My key question to those advocating the use of timedelta instead of Decimal:
>>
>> What should timedelta.total_seconds() return to avoid losing
>> nanosecond precision?
>> How should this be requested when calling the API?
>
> It should return a float as it does today.  Add a
> timedelta.total_nanoseconds() call for people wanting high precision
> as a raw number and remind people of the precision limits of
> total_seconds() in the docs.

total_nanoseconds() would return an int() in case that wasn't obvious.

>
> -gps
More information about the Python-Dev mailing list

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