From: Stefan Behnel <scoder@users.berlios.de> Date: Fri, 4 Dec 2009 05:35:05 +0000 (+0100) Subject: list of builtin types that are known to always return an instance of themselves X-Git-Tag: 0.12.1~102 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e684214160b206df33bf7c28130c8385535c9606;p=cython.git list of builtin types that are known to always return an instance of themselves --- diff --git a/Cython/Compiler/Builtin.py b/Cython/Compiler/Builtin.py index 062afb77..37bd6228 100644 --- a/Cython/Compiler/Builtin.py +++ b/Cython/Compiler/Builtin.py @@ -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 = [