[Python-Dev] an alternative to embedding policy in PEP 418 (was: PEP 418: Add monotonic clock)
Ethan Furman
ethan at stoneleaf.us
Tue Apr 3 18:07:05 CEST 2012
Lennart Regebro wrote:
> On Tue, Apr 3, 2012 at 08:03, Cameron Simpson <cs at zip.com.au> wrote:
>> clock = get_clock(MONOTONIC|HIRES) or get_clock(MONOTONIC)
>>>> If the symbol names are not the horribleness, can you qualify what API
>> you would like more?
>> Well, get_clock(monotonic=True, highres=True) would be a vast
> improvement over get_clock(MONOTONIC|HIRES).
Allowing get_clock(True, True)? Ick. My nomination would be
get_clock(MONOTONIC, HIGHRES) -- easier on the eyes with no |.
> I also think it should
> raise an error if not found. The clarity and easy of use of the API is
> much more important than how much you can do in one line.
What's unclear about returning None if no clocks match?
Cheers,
~Ethan~
More information about the Python-Dev
mailing list