[Python-Dev] [RFC] PEP 418: Add monotonic time, performance counter and process time functions

Victor Stinner victor.stinner at gmail.com
Sun Apr 29 03:21:52 CEST 2012

>>> 2) get_clock_info returns a dict. Why not a namedtuple?
>> Future flexibility. And there's no need for it to be a *tuple*.
> I haven't been paying attention to this discussion, so this isn't a
> comment on any time functions specifically.
> But we generally use a namedtuple (or structseq) for things like
> get_clock_info. For example, for sys.float_info there's no need for it
> to be a tuple, and it can be extended in the future, yet it's a structseq.

Ok ok, I changed the is_adjusted flag to make it mandatory and I
changed get_clock_info() to return a clock_info object. clock_info is
a structseq.

I didn't mention that clock_info can be read using an index because I
really don't like the tuple-like API.


More information about the Python-Dev mailing list