PEP 418: Replace "API design" title with "Alternatives: API design"
This commit is contained in:
parent
ae01ce94ad
commit
4f31bacf76
12
pep-0418.txt
12
pep-0418.txt
|
@ -340,15 +340,8 @@ QueryUnbiasedInterruptTime() was introduced in Windows 7.
|
|||
|
||||
|
||||
|
||||
API design
|
||||
==========
|
||||
|
||||
Two functions: time.monotonic(), time.try_monotonic()
|
||||
-----------------------------------------------------
|
||||
|
||||
* time.try_monotonic() falls back to another clock if no monotonic clock is not
|
||||
available or does not work, but it does never fail.
|
||||
* time.monotonic() is not always available and may raise OSError.
|
||||
Alternatives: API design
|
||||
========================
|
||||
|
||||
One function with a flag: time.try_monotonic(strict=False)
|
||||
----------------------------------------------------------
|
||||
|
@ -364,6 +357,7 @@ poor API."
|
|||
Raising NotImplementedError for a function is something uncommon in Python and
|
||||
should be avoided.
|
||||
|
||||
|
||||
One function, no flag
|
||||
---------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue