Skip to content

Commit 4144455

Browse files
committed
Clarify context manager version availability
It's only Python 2.5.X that needs the __future__ with. See https://www.python.org/dev/peps/pep-0343/ "In Python 2.5, the new syntax will only be recognized if a future statement is present: from __future__ import with_statement <snip> In Python 2.6, the new syntax will always be recognized; 'with' and 'as' are always keywords."
1 parent 8501da7 commit 4144455

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targeting_python_2_3.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The first and most important method is to use ``__future__`` imports. It
1919
allows you to import Python 3 functionality in Python 2. Here is an
2020
example:
2121

22-
- Context manager were new in Python 3. For using them in Python 2.5+
22+
- Context managers were new in Python 2.6+. For using them in Python 2.5+
2323
you can use:
2424

2525
.. code:: python

0 commit comments

Comments
 (0)