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-June/120158.html below:

[Python-Dev] time.clock_info() field names

[Python-Dev] time.clock_info() field namesVictor Stinner victor.stinner at gmail.com
Tue Jun 12 23:03:40 CEST 2012
2012/5/4 Victor Stinner <victor.stinner at gmail.com>:
> Anyway, the implementation and/or the documentation is buggy and
> should be fixed (especially the Windows case).

Done, I renamed "adjusted" to "adjustable", fixed its value on Windows
(time.time) and Linux (time.monotonic), and updated the doc.
--
changeset:   77415:0e46e0cd368f
tag:         tip
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Tue Jun 12 22:46:37 2012 +0200
files:       Doc/library/time.rst Include/pytime.h
Lib/test/test_time.py Misc/NEWS Modules/timemodule.c Python/pytime.c
description:
PEP 418: Rename adjusted attribute to adjustable in time.get_clock_info() result

Fix also its value on Windows and Linux according to its documentation:
"adjustable" indicates if the clock *can be* adjusted, not if it is or was
adjusted.

In most cases, it is not possible to indicate if a clock is or was adjusted.
--
Basically, time.get_clock_info().adjustable is only True for
time.time(). It can also be True for time.perf_counter() if
time.monotonic() is not available.

I prefer "adjustable" over "adjusted" because it is well defined and
its value is well known. For example, it is not easy to say if
time.monotonic() is "adjusted" or not on Linux, whereas I can say that
time.monotonic() is not *adjustable* on any OS.

I will update the PEP except if someone complains :-)

Sorry for being late, but I was exhausted by this PEP.

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