Movatterモバイル変換
[0]ホーム
[Python-Dev] PEP 410 (Decimal timestamp): the implementation is ready for a review
Gregory P. Smithgreg at krypto.org
Wed Feb 15 02:10:20 CET 2012
On Tue, Feb 14, 2012 at 2:29 PM, Barry Warsaw <barry at python.org> wrote:> I think I will just state my reasoning one last time and then leave it to the> BDFL or BDFOP to make the final decision.>> Victor on IRC says that there is not much difference between Decimal and> timedelta, and this may be true from an implementation point of view. >From a> cognitive point of view, I think they're miles apart. Ultimately, I wish ints> and floats weren't used for time-y things, and only datetimes (for values with> well-defined starting points, including the epoch) and timedeltas (for values> with no starting point) were used.>> We obviously can't eliminate the APIs that return and accept ints and floats,> most of which we inherited from C, but we can avoid making it worse by> extended them to also accept Decimals. I think it would be valuable work to> correct any deficiencies in datetimes and timedeltas so that they can be used> in all time-y APIs, with whatever resolution is necessary.>> 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.+1
More information about the Python-Devmailing list
[8]ページ先頭