@@ -10,7 +10,7 @@ recommended solutions. It is not a complete guide to Python 2 and 3
10
10
compatibility.
11
11
12
12
Welcome to the ``__future__ ``
13
- -----------------------------
13
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
14
15
15
The top of every `.py ` file should include the following::
16
16
@@ -26,7 +26,7 @@ gets used *a lot*::
26
26
import six
27
27
28
28
Finding places to use six
29
- -------------------------
29
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
30
30
31
31
The only way to make sure code works on both Python 2 and 3 is to make sure it
32
32
is covered by unit tests.
@@ -41,7 +41,7 @@ The `six <http://pythonhosted.org/six/>`_ documentation serves as a
41
41
good reference for the sorts of things that need to be updated.
42
42
43
43
The dreaded ``\u `` escapes
44
- --------------------------
44
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
45
45
46
46
When `from __future__ import unicode_literals ` is used, all string
47
47
literals (not preceded with a `b `) will become unicode literals.
@@ -86,7 +86,7 @@ of that and still support Python 2::
86
86
'\\u'
87
87
88
88
Iteration
89
- ---------
89
+ ^^^^^^^^^
90
90
91
91
The behavior of the methods for iterating over the items, values and
92
92
keys of a dictionary has changed in Python 3. Additionally, other
@@ -111,7 +111,7 @@ Python 2 Python 3 six
111
111
============================== ============================== ==============================
112
112
113
113
Numpy-specific things
114
- ---------------------
114
+ ^^^^^^^^^^^^^^^^^^^^^
115
115
116
116
When specifying dtypes, all strings must be byte strings on Python 2
117
117
and unicode strings on Python 3. The best way to handle this is to
0 commit comments