list of builtin types that are known to always return an instance of themselves
authorStefan Behnel <scoder@users.berlios.de>
Fri, 4 Dec 2009 05:35:05 +0000 (06:35 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 4 Dec 2009 05:35:05 +0000 (06:35 +0100)
Cython/Compiler/Builtin.py

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