Commit 22111321 authored by Stefan Behnel's avatar Stefan Behnel

prevent 'file' from being recognised as a builtin type - it's no longer available in Py3

parent f5e3ddee
......@@ -115,7 +115,7 @@ builtin_types_table = [
("copy", "O", "O", "PyDict_Copy")]),
("slice", "PySlice_Type", []),
("file", "PyFile_Type", []),
# ("file", "PyFile_Type", []), # not in Py3
("set", "PySet_Type", [("clear", "O", "i", "PySet_Clear"),
("discard", "OO", "i", "PySet_Discard"),
......@@ -128,8 +128,9 @@ 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', 'set', 'frozenset'
'dict', 'set', 'frozenset'
# 'str', # only in Py3.x
# 'file', # only in Py2.x
)
......
......@@ -772,7 +772,7 @@ class BuiltinScope(Scope):
"frozenset": ["((PyObject*)&PyFrozenSet_Type)", py_object_type],
"slice": ["((PyObject*)&PySlice_Type)", py_object_type],
"file": ["((PyObject*)&PyFile_Type)", py_object_type],
# "file": ["((PyObject*)&PyFile_Type)", py_object_type], # not in Py3
"None": ["Py_None", py_object_type],
"False": ["Py_False", py_object_type],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment