A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-April/119117.html below:

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

[Python-Dev] [RFC] PEP 418: Add monotonic time, performance counter and process time functionsVictor 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.

Victor
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4