Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
74302dbd
Commit
74302dbd
authored
May 08, 2007
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of 'file' built-in. Get rid of types.StringType and friends.
parent
317e7749
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
15 deletions
+0
-15
Lib/site.py
Lib/site.py
+0
-2
Lib/types.py
Lib/types.py
+0
-12
Python/bltinmodule.c
Python/bltinmodule.c
+0
-1
No files found.
Lib/site.py
View file @
74302dbd
...
...
@@ -414,9 +414,7 @@ def installnewio():
def
__new__
(
cls
,
*
args
,
**
kwds
):
return
io
.
open
(
*
args
,
**
kwds
)
__builtin__
.
classic_open
=
__builtin__
.
open
__builtin__
.
classic_file
=
__builtin__
.
file
__builtin__
.
open
=
open
__builtin__
.
file
=
open
sys
.
stdin
=
io
.
open
(
0
,
"r"
)
sys
.
stdout
=
io
.
open
(
1
,
"w"
)
sys
.
stderr
=
io
.
open
(
2
,
"w"
)
...
...
Lib/types.py
View file @
74302dbd
...
...
@@ -22,17 +22,6 @@ try:
except
NameError
:
pass
StringType
=
str
# StringTypes is already outdated. Instead of writing "type(x) in
# types.StringTypes", you should use "isinstance(x, basestring)". But
# we keep around for compatibility with Python 2.2.
try
:
UnicodeType
=
str
StringTypes
=
(
StringType
,
UnicodeType
)
except
NameError
:
StringTypes
=
(
StringType
,)
BufferType
=
buffer
TupleType
=
tuple
...
...
@@ -62,7 +51,6 @@ BuiltinFunctionType = type(len)
BuiltinMethodType
=
type
([].
append
)
# Same as BuiltinFunctionType
ModuleType
=
type
(
sys
)
FileType
=
file
try
:
raise
TypeError
...
...
Python/bltinmodule.c
View file @
74302dbd
...
...
@@ -2040,7 +2040,6 @@ _PyBuiltin_Init(void)
#endif
SETBUILTIN
(
"dict"
,
&
PyDict_Type
);
SETBUILTIN
(
"enumerate"
,
&
PyEnum_Type
);
SETBUILTIN
(
"file"
,
&
PyFile_Type
);
SETBUILTIN
(
"float"
,
&
PyFloat_Type
);
SETBUILTIN
(
"frozenset"
,
&
PyFrozenSet_Type
);
SETBUILTIN
(
"property"
,
&
PyProperty_Type
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment