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/116559.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 reviewVictor Stinner victor.stinner at gmail.com
Thu Feb 16 13:15:08 CET 2012
2012/2/15 Guido van Rossum <guido at python.org>:
> So using floats we can match 100ns precision, right?

Nope, not to store an Epoch timestamp newer than january 1987:

>>> x=2**29; (x+1e-7) != x # no loss of precision
True
>>> x=2**30; (x+1e-7) != x # lose precision
False
>>> print(datetime.timedelta(seconds=2**29))
6213 days, 18:48:32
>>> print(datetime.datetime.fromtimestamp(2**29))
1987-01-05 19:48:32

Victor
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