Remove with_statement future imports from 2.6 docs.
This commit is contained in:
parent
9fcd8ceb74
commit
9749e15e2f
|
@ -23,7 +23,6 @@ Functions provided:
|
||||||
|
|
||||||
A simple example (this is not recommended as a real way of generating HTML!)::
|
A simple example (this is not recommended as a real way of generating HTML!)::
|
||||||
|
|
||||||
from __future__ import with_statement
|
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
|
@ -100,7 +99,6 @@ Functions provided:
|
||||||
|
|
||||||
And lets you write code like this::
|
And lets you write code like this::
|
||||||
|
|
||||||
from __future__ import with_statement
|
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
|
|
|
@ -840,7 +840,6 @@ the :func:`localcontext` function to temporarily change the active context.
|
||||||
For example, the following code sets the current decimal precision to 42 places,
|
For example, the following code sets the current decimal precision to 42 places,
|
||||||
performs a calculation, and then automatically restores the previous context::
|
performs a calculation, and then automatically restores the previous context::
|
||||||
|
|
||||||
from __future__ import with_statement
|
|
||||||
from decimal import localcontext
|
from decimal import localcontext
|
||||||
|
|
||||||
with localcontext() as ctx:
|
with localcontext() as ctx:
|
||||||
|
|
|
@ -48,6 +48,9 @@ Number-theoretic and representation functions:
|
||||||
Return the floor of *x* as a float, the largest integer value less than or equal
|
Return the floor of *x* as a float, the largest integer value less than or equal
|
||||||
to *x*.
|
to *x*.
|
||||||
|
|
||||||
|
.. versionchanged:: 2.6
|
||||||
|
Added :meth:`__floor__` delegation.
|
||||||
|
|
||||||
|
|
||||||
.. function:: fmod(x, y)
|
.. function:: fmod(x, y)
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
|
|
||||||
:mod:`numbers` --- Numeric abstract base classes
|
:mod:`numbers` --- Numeric abstract base classes
|
||||||
================================================
|
================================================
|
||||||
|
|
||||||
.. module:: numbers
|
.. module:: numbers
|
||||||
:synopsis: Numeric abstract base classes (Complex, Real, Integral, etc.).
|
:synopsis: Numeric abstract base classes (Complex, Real, Integral, etc.).
|
||||||
|
|
||||||
|
.. versionadded:: 2.6
|
||||||
|
|
||||||
|
|
||||||
The :mod:`numbers` module (:pep:`3141`) defines a hierarchy of numeric abstract
|
The :mod:`numbers` module (:pep:`3141`) defines a hierarchy of numeric abstract
|
||||||
base classes which progressively define more operations. These concepts also
|
base classes which progressively define more operations. These concepts also
|
||||||
provide a way to distinguish exact from inexact types. None of the types defined
|
provide a way to distinguish exact from inexact types. None of the types defined
|
||||||
|
|
|
@ -135,7 +135,6 @@ Lock objects have the following methods:
|
||||||
In addition to these methods, lock objects can also be used via the
|
In addition to these methods, lock objects can also be used via the
|
||||||
:keyword:`with` statement, e.g.::
|
:keyword:`with` statement, e.g.::
|
||||||
|
|
||||||
from __future__ import with_statement
|
|
||||||
import thread
|
import thread
|
||||||
|
|
||||||
a_lock = thread.allocate_lock()
|
a_lock = thread.allocate_lock()
|
||||||
|
|
|
@ -723,7 +723,6 @@ Currently, :class:`Lock`, :class:`RLock`, :class:`Condition`,
|
||||||
:class:`Semaphore`, and :class:`BoundedSemaphore` objects may be used as
|
:class:`Semaphore`, and :class:`BoundedSemaphore` objects may be used as
|
||||||
:keyword:`with` statement context managers. For example::
|
:keyword:`with` statement context managers. For example::
|
||||||
|
|
||||||
from __future__ import with_statement
|
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
some_rlock = threading.RLock()
|
some_rlock = threading.RLock()
|
||||||
|
|
Loading…
Reference in New Issue