Skip to content

Commit a52ac24

Browse files
committed
Doc tweaks
1 parent 5c069ce commit a52ac24

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
],
122122

123123
# Render the next and previous page links in navbar. (Default: true)
124-
'navbar_sidebarrel': True,
124+
'navbar_sidebarrel': False,
125125

126126
# Render the current pages TOC in the navbar. (Default: true)
127127
'navbar_pagenav': True,

docs/contents.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ Contents:
77
overview
88
whatsnew
99
quickstart
10+
compatible_idioms
1011
imports
1112
standard_library_imports
1213
what_else
1314
automatic_conversion
14-
compatible_idioms
1515
futurize_cheatsheet
1616
stdlib_incompatibilities
1717
faq

docs/futurize.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
Futurize: 2 to both
44
--------------------
55

6-
For example, running ``futurize`` turns this Python 2 code::
6+
For example, running ``futurize`` turns this Python 2 code:
7+
8+
.. code-block:: python
79
810
import ConfigParser # Py2 module name
911
@@ -20,7 +22,9 @@ For example, running ``futurize`` turns this Python 2 code::
2022
for letter in itr:
2123
print letter, # Py2-style print statement
2224
23-
into this code which runs on both Py2 and Py3::
25+
into this code which runs on both Py2 and Py3:
26+
27+
.. code-block:: python
2428
2529
from __future__ import print_function
2630
from future import standard_library
@@ -72,6 +76,7 @@ up-to-date without breaking Py2 compatibility. The resulting code will be
7276
modern Python 2.6-compatible code plus ``__future__`` imports from the
7377
following set::
7478

79+
.. code-block:: python
7580
from __future__ import absolute_import
7681
from __future__ import division
7782
from __future__ import print_function
@@ -119,7 +124,9 @@ porting process, but without introducing any bugs. It should be uncontroversial
119124
and safe to apply to every Python 2 package. The subsequent patches introducing
120125
Python 3 compatibility should then be shorter and easier to review.
121126

122-
The complete set of fixers applied by ``futurize --stage1`` is::
127+
The complete set of fixers applied by ``futurize --stage1`` is:
128+
129+
.. code-block:: python
123130
124131
lib2to3.fixes.fix_apply
125132
lib2to3.fixes.fix_except

docs/quickstart.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ provide support for running your code on Python 2.6 and 2.7 mostly unchanged.
4545
- For more examples, see :ref:`overview`.
4646
- For explicit import forms, see :ref:`imports`.
4747
- For more details, see :ref:`what-else`.
48+
- For a cheat sheet, see :ref:`compatible-idioms`.
4849

4950

5051
To convert existing Python 3 code
@@ -152,5 +153,6 @@ For more information on the automatic translation feature, see :ref:`translation
152153

153154
Next steps
154155
----------
155-
For more information about writing Py3/2-compatible code, see :ref:`what-else`.
156+
For more information about writing Py2/3-compatible code, see
157+
:ref:`compatible-idioms` and :ref:`what-else`.
156158

docs/stdlib_incompatibilities.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
.. _stdlib-incompatibilities:
22

3-
Use of strings and bytes in standard library interfaces
4-
=======================================================
5-
6-
- io.StringIO: takes a unicode on both Py2 and Py3
7-
- io.BytesIO: takes a byte-string on both Py2 and Py3
8-
9-
103
Standard library incompatibilities
114
==================================
125

0 commit comments

Comments
 (0)