Mercurial > cpython-lru_cache-weakref
annotate Lib/__future__.py @ 80661:94de77bd0b4b 2.7
Issue #16194: document imp.load_dynamic problems
when read several extension modules from the same binary object file.
| author | Andrew Svetlov <andrew.svetlov@gmail.com> |
|---|---|
| date | Thu, 29 Nov 2012 19:51:28 +0200 |
| parents | cc9e5ddd8220 |
| children |
| rev | line source |
|---|---|
|
17044
6ca72d71536e
Remove redundant "__future__:" from module docstring.
Ka-Ping Yee <ping@zesty.ca>
parents:
16931
diff
changeset
|
1 """Record of phased-in incompatible language changes. |
|
16770
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
2 |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
3 Each line is of the form: |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
4 |
|
19345
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
5 FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease "," |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
6 CompilerFlag ")" |
|
16770
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
7 |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
8 where, normally, OptionalRelease < MandatoryRelease, and both are 5-tuples |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
9 of the same form as sys.version_info: |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
10 |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
11 (PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
12 PY_MINOR_VERSION, # the 1; an int |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
13 PY_MICRO_VERSION, # the 0; an int |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
14 PY_RELEASE_LEVEL, # "alpha", "beta", "candidate" or "final"; string |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
15 PY_RELEASE_SERIAL # the 3; an int |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
16 ) |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
17 |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
18 OptionalRelease records the first release in which |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
19 |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
20 from __future__ import FeatureName |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
21 |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
22 was accepted. |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
23 |
|
16833
bbdeb6d4dea1
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
16770
diff
changeset
|
24 In the case of MandatoryReleases that have not yet occurred, |
|
bbdeb6d4dea1
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
16770
diff
changeset
|
25 MandatoryRelease predicts the release in which the feature will become part |
|
16770
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
26 of the language. |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
27 |
|
16833
bbdeb6d4dea1
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
16770
diff
changeset
|
28 Else MandatoryRelease records when the feature became part of the language; |
|
16770
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
29 in releases at or after that, modules no longer need |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
30 |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
31 from __future__ import FeatureName |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
32 |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
33 to use the feature in question, but may continue to use such imports. |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
34 |
|
16833
bbdeb6d4dea1
Whitespace normalization.
Tim Peters <tim.peters@gmail.com>
parents:
16770
diff
changeset
|
35 MandatoryRelease may also be None, meaning that a planned feature got |
|
16770
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
36 dropped. |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
37 |
|
16929
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
38 Instances of class _Feature have two corresponding methods, |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
39 .getOptionalRelease() and .getMandatoryRelease(). |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
40 |
|
19345
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
41 CompilerFlag is the (bitfield) flag that should be passed in the fourth |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
42 argument to the builtin function compile() to enable the feature in |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
43 dynamically compiled code. This flag is stored in the .compiler_flag |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
44 attribute on _Future instances. These values must match the appropriate |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
45 #defines of CO_xxx flags in Include/compile.h. |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
46 |
|
16929
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
47 No feature line is ever to be deleted from this file. |
|
16770
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
48 """ |
|
14affbd03750
Add __future__.py to std library, + dull test to verify that assignments
Tim Peters <tim.peters@gmail.com>
parents:
diff
changeset
|
49 |
|
19345
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
50 all_feature_names = [ |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
51 "nested_scopes", |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
52 "generators", |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
53 "division", |
|
36712
5c36c222e7ca
SF patch #1438387, PEP 328: relative and absolute imports.
Thomas Wouters <thomas@python.org>
parents:
36700
diff
changeset
|
54 "absolute_import", |
|
36726
bbf16fd024df
from __future__ import with_statement addon for 'with', mostly written by
Thomas Wouters <thomas@python.org>
parents:
36712
diff
changeset
|
55 "with_statement", |
|
45891
727f743cf630
Backport of the print function, using a __future__ import.
Eric Smith <eric@trueblade.com>
parents:
37420
diff
changeset
|
56 "print_function", |
|
46118
c78d3586c474
Patch #2477: Added from __future__ import unicode_literals
Christian Heimes <christian@cheimes.de>
parents:
45891
diff
changeset
|
57 "unicode_literals", |
|
19345
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
58 ] |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
59 |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
60 __all__ = ["all_feature_names"] + all_feature_names |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
61 |
|
19461
f7aaf721a81b
Back out trying to use the C values for CO_xxx.
Tim Peters <tim.peters@gmail.com>
parents:
19378
diff
changeset
|
62 # The CO_xxx symbols are defined here under the same names used by |
|
f7aaf721a81b
Back out trying to use the C values for CO_xxx.
Tim Peters <tim.peters@gmail.com>
parents:
19378
diff
changeset
|
63 # compile.h, so that an editor search will find them here. However, |
|
f7aaf721a81b
Back out trying to use the C values for CO_xxx.
Tim Peters <tim.peters@gmail.com>
parents:
19378
diff
changeset
|
64 # they're not exported in __all__, because they don't really belong to |
|
f7aaf721a81b
Back out trying to use the C values for CO_xxx.
Tim Peters <tim.peters@gmail.com>
parents:
19378
diff
changeset
|
65 # this module. |
|
f7aaf721a81b
Back out trying to use the C values for CO_xxx.
Tim Peters <tim.peters@gmail.com>
parents:
19378
diff
changeset
|
66 CO_NESTED = 0x0010 # nested_scopes |
|
36700
2a2d46d1929a
Finish removal of CO_GENERATOR_ALLOWED.
Neal Norwitz <nnorwitz@gmail.com>
parents:
19474
diff
changeset
|
67 CO_GENERATOR_ALLOWED = 0 # generators (obsolete, was 0x1000) |
|
19461
f7aaf721a81b
Back out trying to use the C values for CO_xxx.
Tim Peters <tim.peters@gmail.com>
parents:
19378
diff
changeset
|
68 CO_FUTURE_DIVISION = 0x2000 # division |
|
37418
cea54c9d921d
Don't abbreviate ABS, use long name ABSOLUTE.
Neal Norwitz <nnorwitz@gmail.com>
parents:
36730
diff
changeset
|
69 CO_FUTURE_ABSOLUTE_IMPORT = 0x4000 # perform absolute imports by default |
|
36730
87706438dc3c
Make __future__ features similar for with and absolute import since they were both added before a1
Neal Norwitz <nnorwitz@gmail.com>
parents:
36726
diff
changeset
|
70 CO_FUTURE_WITH_STATEMENT = 0x8000 # with statement |
|
45891
727f743cf630
Backport of the print function, using a __future__ import.
Eric Smith <eric@trueblade.com>
parents:
37420
diff
changeset
|
71 CO_FUTURE_PRINT_FUNCTION = 0x10000 # print function |
|
46118
c78d3586c474
Patch #2477: Added from __future__ import unicode_literals
Christian Heimes <christian@cheimes.de>
parents:
45891
diff
changeset
|
72 CO_FUTURE_UNICODE_LITERALS = 0x20000 # unicode string literals |
|
19345
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
73 |
|
16929
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
74 class _Feature: |
|
19345
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
75 def __init__(self, optionalRelease, mandatoryRelease, compiler_flag): |
|
16929
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
76 self.optional = optionalRelease |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
77 self.mandatory = mandatoryRelease |
|
19345
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
78 self.compiler_flag = compiler_flag |
|
16929
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
79 |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
80 def getOptionalRelease(self): |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
81 """Return first release in which this feature was recognized. |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
82 |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
83 This is a 5-tuple, of the same form as sys.version_info. |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
84 """ |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
85 |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
86 return self.optional |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
87 |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
88 def getMandatoryRelease(self): |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
89 """Return release in which this feature will become mandatory. |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
90 |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
91 This is a 5-tuple, of the same form as sys.version_info, or, if |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
92 the feature was dropped, is None. |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
93 """ |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
94 |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
95 return self.mandatory |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
96 |
|
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
97 def __repr__(self): |
|
19474
f9f4bdcbc25a
Repair repr of future-features (wasn't updated to include the new
Tim Peters <tim.peters@gmail.com>
parents:
19461
diff
changeset
|
98 return "_Feature" + repr((self.optional, |
|
f9f4bdcbc25a
Repair repr of future-features (wasn't updated to include the new
Tim Peters <tim.peters@gmail.com>
parents:
19461
diff
changeset
|
99 self.mandatory, |
|
f9f4bdcbc25a
Repair repr of future-features (wasn't updated to include the new
Tim Peters <tim.peters@gmail.com>
parents:
19461
diff
changeset
|
100 self.compiler_flag)) |
|
19345
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
101 |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
102 nested_scopes = _Feature((2, 1, 0, "beta", 1), |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
103 (2, 2, 0, "alpha", 0), |
|
19461
f7aaf721a81b
Back out trying to use the C values for CO_xxx.
Tim Peters <tim.peters@gmail.com>
parents:
19378
diff
changeset
|
104 CO_NESTED) |
|
16929
3a2e8a3ede48
Make names in __future__.py bind to class instances instead of 2-tuples.
Tim Peters <tim.peters@gmail.com>
parents:
16833
diff
changeset
|
105 |
|
19345
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
106 generators = _Feature((2, 2, 0, "alpha", 1), |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
107 (2, 3, 0, "final", 0), |
|
19461
f7aaf721a81b
Back out trying to use the C values for CO_xxx.
Tim Peters <tim.peters@gmail.com>
parents:
19378
diff
changeset
|
108 CO_GENERATOR_ALLOWED) |
|
19345
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
109 |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
110 division = _Feature((2, 2, 0, "alpha", 2), |
|
38be177bd493
A self-contained piece of Michael Hudson's patch
Tim Peters <tim.peters@gmail.com>
parents:
19051
diff
changeset
|
111 (3, 0, 0, "alpha", 0), |
|
19461
f7aaf721a81b
Back out trying to use the C values for CO_xxx.
Tim Peters <tim.peters@gmail.com>
parents:
19378
diff
changeset
|
112 CO_FUTURE_DIVISION) |
|
36712
5c36c222e7ca
SF patch #1438387, PEP 328: relative and absolute imports.
Thomas Wouters <thomas@python.org>
parents:
36700
diff
changeset
|
113 |
|
5c36c222e7ca
SF patch #1438387, PEP 328: relative and absolute imports.
Thomas Wouters <thomas@python.org>
parents:
36700
diff
changeset
|
114 absolute_import = _Feature((2, 5, 0, "alpha", 1), |
|
77054
cc9e5ddd8220
#14494: Document that absolute imports became default in 3.0 instead of 2.7.
Petri Lehtinen <petri@digip.org>
parents:
46118
diff
changeset
|
115 (3, 0, 0, "alpha", 0), |
|
37420
a3481871132c
I could have sworn this was part of the change to not abbreviate ABSOLUTE
Neal Norwitz <nnorwitz@gmail.com>
parents:
37418
diff
changeset
|
116 CO_FUTURE_ABSOLUTE_IMPORT) |
|
36726
bbf16fd024df
from __future__ import with_statement addon for 'with', mostly written by
Thomas Wouters <thomas@python.org>
parents:
36712
diff
changeset
|
117 |
|
36730
87706438dc3c
Make __future__ features similar for with and absolute import since they were both added before a1
Neal Norwitz <nnorwitz@gmail.com>
parents:
36726
diff
changeset
|
118 with_statement = _Feature((2, 5, 0, "alpha", 1), |
|
36726
bbf16fd024df
from __future__ import with_statement addon for 'with', mostly written by
Thomas Wouters <thomas@python.org>
parents:
36712
diff
changeset
|
119 (2, 6, 0, "alpha", 0), |
|
bbf16fd024df
from __future__ import with_statement addon for 'with', mostly written by
Thomas Wouters <thomas@python.org>
parents:
36712
diff
changeset
|
120 CO_FUTURE_WITH_STATEMENT) |
|
45891
727f743cf630
Backport of the print function, using a __future__ import.
Eric Smith <eric@trueblade.com>
parents:
37420
diff
changeset
|
121 |
|
727f743cf630
Backport of the print function, using a __future__ import.
Eric Smith <eric@trueblade.com>
parents:
37420
diff
changeset
|
122 print_function = _Feature((2, 6, 0, "alpha", 2), |
|
727f743cf630
Backport of the print function, using a __future__ import.
Eric Smith <eric@trueblade.com>
parents:
37420
diff
changeset
|
123 (3, 0, 0, "alpha", 0), |
|
727f743cf630
Backport of the print function, using a __future__ import.
Eric Smith <eric@trueblade.com>
parents:
37420
diff
changeset
|
124 CO_FUTURE_PRINT_FUNCTION) |
|
46118
c78d3586c474
Patch #2477: Added from __future__ import unicode_literals
Christian Heimes <christian@cheimes.de>
parents:
45891
diff
changeset
|
125 |
|
c78d3586c474
Patch #2477: Added from __future__ import unicode_literals
Christian Heimes <christian@cheimes.de>
parents:
45891
diff
changeset
|
126 unicode_literals = _Feature((2, 6, 0, "alpha", 2), |
|
c78d3586c474
Patch #2477: Added from __future__ import unicode_literals
Christian Heimes <christian@cheimes.de>
parents:
45891
diff
changeset
|
127 (3, 0, 0, "alpha", 0), |
|
c78d3586c474
Patch #2477: Added from __future__ import unicode_literals
Christian Heimes <christian@cheimes.de>
parents:
45891
diff
changeset
|
128 CO_FUTURE_UNICODE_LITERALS) |
