projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a77c750
)
from __future__ import braces
author
Stefan Behnel
<scoder@users.berlios.de>
Wed, 9 Jul 2008 20:02:59 +0000
(22:02 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Wed, 9 Jul 2008 20:02:59 +0000
(22:02 +0200)
Cython/Compiler/Parsing.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Parsing.py
b/Cython/Compiler/Parsing.py
index f63076a4846ef97c9eb1f7681e53b8629a871421..cda156d1f000834eb4a6391d6689f85a62904803 100644
(file)
--- a/
Cython/Compiler/Parsing.py
+++ b/
Cython/Compiler/Parsing.py
@@
-974,10
+974,13
@@
def p_from_import_statement(s, first_statement = 0):
s.error("from __future__ imports must occur at the beginning of the file")
else:
for (name_pos, name, as_name, kind) in imported_names:
+ if name == "braces":
+ s.error("not a chance", name_pos)
+ break
try:
directive = getattr(Future, name)
except AttributeError:
- s.error("future feature %s is not defined" % name)
+ s.error("future feature %s is not defined" % name
, name_pos
)
break
s.context.future_directives.add(directive)
return Nodes.PassStatNode(pos)