@@ -45,6 +45,7 @@ These are all available in Python 2.6 and up, and mandatory in Python 3+.
45
45
46
46
Explicit imports
47
47
~~~~~~~~~~~~~~~~
48
+
48
49
If you prefer explicit imports, the explicit equivalent of the ``from
49
50
future.builtins import * `` line is::
50
51
@@ -53,7 +54,10 @@ future.builtins import *`` line is::
53
54
str, bytes, range, round, super,
54
55
apply, cmp, coerce, execfile, file, long,
55
56
raw_input, reduce, reload, unicode, xrange,
56
- str, StandardError)
57
+ StandardError)
58
+
59
+ However, we discourage importing only some of these builtins because this
60
+ increases the risk of introducing Py2/3 portability bugs into your code.
57
61
58
62
To understand what each of these does, see the docs for these modules:
59
63
@@ -65,13 +69,13 @@ To understand what each of these does, see the docs for these modules:
65
69
66
70
The internal API is currently as follows::
67
71
68
- from future.builtins.iterators import zip , map, filter
69
- from future.builtins.misc import ascii, oct , hex, chr , int, input , open
70
- from future.builtins.backports import str, bytes, range, round, super
72
+ from future.builtins.iterators import filter , map, zip
73
+ from future.builtins.misc import ascii, chr , hex, input , int, oct , open
74
+ from future.builtins.backports import bytes, range, round, str , super
71
75
from future.builtins.disabled import (apply, cmp, coerce,
72
76
execfile, file, long, raw_input, reduce, reload, unicode,
73
77
xrange, StandardError)
74
78
75
- But please note that this internal API may not be stable between
76
- different versions of ``future ``.
79
+ But please note that this internal API is evolving and may not be stable
80
+ between different versions of ``future ``.
77
81
0 commit comments