[issue16042] smtplib: unlimited readline() from connection

Serhiy Storchaka report at bugs.python.org
Sat Oct 20 22:37:44 CEST 2012


Serhiy Storchaka added the comment:

I understand you, it's a patch against 2.7.

>+        def readline(self, size=-1):

In io.IOBase.readline() and in io.TextIOBase.readline() this parameter named "limit".

>+                if size is not None and len(str) == size:
>+                    break

It can be moved to the while condition:

             while chr != b"\n" and (size is None or len(str) < size):

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16042>
_______________________________________


More information about the Python-bugs-list mailing list