Author: guido.van.rossum
Date: Tue Nov  6 19:57:40 2007
New Revision: 58882

Modified:
   python/branches/py3k-pep3137/Lib/io.py
Log:
Fix the final two failing tests in test_mailbox.  They failed because
io.py didn't equate f.readline(-1) with f.readline(None) i.e. f.readline().


Modified: python/branches/py3k-pep3137/Lib/io.py
==============================================================================
--- python/branches/py3k-pep3137/Lib/io.py      (original)
+++ python/branches/py3k-pep3137/Lib/io.py      Tue Nov  6 19:57:40 2007
@@ -1266,7 +1266,9 @@
         return line
 
     def readline(self, limit=None):
-        if limit is not None:
+        if limit is None:
+            limit = -1
+        if limit >= 0:
             # XXX Hack to support limit argument, for backwards compatibility
             line = self.readline()
             if len(line) <= limit:
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to