SF bug [#460467] file objects should be subclassable.

Preliminary support.  What's here works, but needs fine-tuning.
This commit is contained in:
Tim Peters 2001-09-13 05:38:56 +00:00
parent 93a696f491
commit 59c9a645e2
7 changed files with 170 additions and 53 deletions

View file

@ -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: