mirror of
https://github.com/python/cpython.git
synced 2026-06-09 04:44:19 -04:00
Be more thorough in blanking out methods grabbed off of an fp.
This commit is contained in:
@@ -33,12 +33,15 @@ class addbase(object):
|
||||
id(self), self.fp)
|
||||
|
||||
def close(self):
|
||||
if self.fp:
|
||||
self.fp.close()
|
||||
self.fp = None
|
||||
self.read = None
|
||||
self.readline = None
|
||||
self.readlines = None
|
||||
self.fileno = None
|
||||
if self.fp: self.fp.close()
|
||||
self.fp = None
|
||||
self.__iter__ = None
|
||||
self.__next__ = None
|
||||
|
||||
def __enter__(self):
|
||||
if self.fp is None:
|
||||
|
||||
Reference in New Issue
Block a user