mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
SF bug [#460467] file objects should be subclassable.
Preliminary support. What's here works, but needs fine-tuning.
This commit is contained in:
parent
93a696f491
commit
59c9a645e2
7 changed files with 170 additions and 53 deletions
|
@ -57,12 +57,7 @@ BuiltinFunctionType = type(len)
|
|||
BuiltinMethodType = type([].append) # Same as BuiltinFunctionType
|
||||
|
||||
ModuleType = type(sys)
|
||||
|
||||
try:
|
||||
FileType = type(sys.__stdin__)
|
||||
except AttributeError:
|
||||
# Not available in restricted mode
|
||||
pass
|
||||
FileType = file
|
||||
XRangeType = type(xrange(0))
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue