Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] PEP: New timestamp formats

Barry Warsawbarry at python.org
Thu Feb 2 17:56:49 CET 2012


On Feb 02, 2012, at 11:07 PM, Nick Coghlan wrote:>Yup, that's why your middle-ground approach didn't make any sense to>me. Returning Decimal when a flag is set to request high precision>values actually handles everything (since any epoch related questions>only arise later when converting the decimal timestamp to an absolute>time value).Guido really dislikes APIs where a flag changes the return type, and I agreewith him.  It's because this is highly unreadable:    results = blah.whatever(True)What the heck does that `True` do?  It can be marginally better with akeyword-only argument, but not much.I haven't read the whole thread so maybe this is a stupid question, but whycan't we add a datetime-compatible higher precision type that hides all theimplementation details?-Barry


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp