extend list of builtins usable in compile time expressions
authorStefan Behnel <stefan_ml@behnel.de>
Wed, 13 Feb 2013 18:11:36 +0000 (19:11 +0100)
committerStefan Behnel <stefan_ml@behnel.de>
Wed, 13 Feb 2013 18:11:36 +0000 (19:11 +0100)
Cython/Compiler/Scanning.py

index 8ba5e4d..8ba17c8 100644 (file)
@@ -96,11 +96,15 @@ def initial_compile_time_env():
         import __builtin__ as builtins
     except ImportError:
         import builtins
+
     names = ('False', 'True',
-        'abs', 'bool', 'chr', 'cmp', 'complex', 'dict', 'divmod', 'enumerate',
-        'float', 'hash', 'hex', 'int', 'len', 'list', 'long', 'map', 'max', 'min',
-        'oct', 'ord', 'pow', 'range', 'reduce', 'repr', 'round', 'slice', 'str',
-        'sum', 'tuple', 'xrange', 'zip')
+             'abs', 'all', 'any', 'ascii', 'bin', 'bool', 'bytearray', 'bytes',
+             'chr', 'cmp', 'complex', 'dict', 'divmod', 'enumerate', 'filter',
+             'float', 'format', 'frozenset', 'hash', 'hex', 'int', 'len',
+             'list', 'long', 'map', 'max', 'min', 'oct', 'ord', 'pow', 'range',
+             'repr', 'reversed', 'round', 'set', 'slice', 'sorted', 'str',
+             'sum', 'tuple', 'xrange', 'zip')
+
     for name in names:
         try:
             benv.declare(name, getattr(builtins, name))