projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b446fc7
)
Avoid total dependency on the new module. This addresses the problem
author
Guido van Rossum
<guido@python.org>
Sun, 19 Aug 2001 05:29:25 +0000
(
05:29
+0000)
committer
Guido van Rossum
<guido@python.org>
Sun, 19 Aug 2001 05:29:25 +0000
(
05:29
+0000)
reported by Greg Ball on python-dev.
Lib/__future__.py
patch
|
blob
|
history
diff --git
a/Lib/__future__.py
b/Lib/__future__.py
index 5a6483832e8c0a33b57bf262e47d410a5bec70df..ebb44a71f6d615f3c82829ffbe37cb9296f06594 100644
(file)
--- a/
Lib/__future__.py
+++ b/
Lib/__future__.py
@@
-55,7
+55,13
@@
all_feature_names = [
__all__ = ["all_feature_names"] + all_feature_names
-import new as _new # for CO_xxx symbols
+try:
+ import new as _new # for CO_xxx symbols
+except ImportError: # May happen during build
+ class _new:
+ CO_NESTED = 0x0010
+ CO_GENERATOR_ALLOWED = 0x1000
+ CO_FUTURE_DIVISION = 0x2000
class _Feature:
def __init__(self, optionalRelease, mandatoryRelease, compiler_flag):