minor cleanup, use set for efficient name lookup
authorStefan Behnel <stefan_ml@behnel.de>
Sat, 27 Jul 2013 04:50:34 +0000 (06:50 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Sat, 27 Jul 2013 04:50:34 +0000 (06:50 +0200)
Cython/Compiler/Builtin.py

index 5f489ca..a66ef20 100644 (file)
@@ -333,14 +333,15 @@ builtin_types_table = [
     ("frozenset", "PyFrozenSet_Type", []),
 ]
 
-types_that_construct_their_instance = (
+
+types_that_construct_their_instance = set([
     # some builtin types do not always return an instance of
     # themselves - these do:
     'type', 'bool', 'long', 'float', 'bytes', 'unicode', 'tuple', 'list',
     'dict', 'set', 'frozenset'
     # 'str',             # only in Py3.x
     # 'file',            # only in Py2.x
-    )
+])
 
 
 builtin_structs_table = [