diff options
author | Guido van Rossum <guido@python.org> | 1994-05-06 14:28:19 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-05-06 14:28:19 (GMT) |
commit | 2922c6dabbd9f8e49975ff3d972644c7212882e9 (patch) | |
tree | 3ea84b9ee77599005eee665078cb486deb7209e6 /Lib/mailbox.py | |
parent | e4c6131baab4d09d31d280fa7dbca76cbe319dbb (diff) | |
download | cpython-2922c6dabbd9f8e49975ff3d972644c7212882e9.zip cpython-2922c6dabbd9f8e49975ff3d972644c7212882e9.tar.gz cpython-2922c6dabbd9f8e49975ff3d972644c7212882e9.tar.bz2 |
Changes to use default argument values where possible
Diffstat (limited to 'Lib/mailbox.py')
-rwxr-xr-x | Lib/mailbox.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py index b7a5598..e93512a 100755 --- a/Lib/mailbox.py +++ b/Lib/mailbox.py @@ -35,24 +35,20 @@ class _Subfile: self.stop = stop self.pos = self.start - def read(self, *args): + def read(self, length = None): if self.pos >= self.stop: return '' - if args == (): + if length is None: length = self.stop - self.pos - else: - length = args[0] self.fp.seek(self.pos) self.pos = self.pos + length return self.fp.read(length) - def readline(self, *args): + def readline(self, length = None): if self.pos >= self.stop: return '' - if args == (): + if length is None: length = self.stop - self.pos - else: - length = args[0] self.fp.seek(self.pos) data = self.fp.readline(length) if len(data) < length: |