Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] PEP: New timestamp formats

Nick Coghlanncoghlan at gmail.com
Thu Feb 2 14:43:02 CET 2012


On Thu, Feb 2, 2012 at 11:31 PM, M.-A. Lemburg <mal at egenix.com> wrote:> Isn't the above (having the return type depend on an argument> setting) something we generally try to avoid ?In Victor's actual patch, the returned object is an instance of thetype you pass in, so it actually avoids that issue.> I think it's better to settle on one type for high-res timers and> add a new API(s) for it.We've basically settled on decimal.Decimal now, so yeah, the decisionbecomes one of spelling - either new APIs that always return Decimalinstances, or a way to ask the existing APIs to return Decimal insteadof floats.The way I see it, the latter should be significantly less hassle tomaintain (since the code remains almost entirely shared), and itbecomes trivial for someone to layer a convenience wrapper over thetop that *always* requests the high precision output.Cheers,Nick.-- Nick Coghlan   |  ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp