def __enter__(self):
"""
supports use of the 'with' clause. You can use the expression:
with myobj as fp:
# write and/or read content here
"""
# Open our file and return a pointer to it
if self.open():
return self
# Throw an exception
raise IOError(errno.EIO, 'Could not open NNTPContent', self.path())
评论列表
文章目录