[issue25752] asyncio.readline - add customizable line separator
STINNER Victor
report at bugs.python.org
Fri Nov 27 17:49:32 EST 2015
STINNER Victor added the comment:
I like the idea. It's common in protocols to have different kinds of
"terminators" to mark the end of a message. C strings use a null byte
for example. I would be trivial to accept other terminators, since we
don't store received bytes as lines, but as a raw byte string
(technically in a bytearray).
> if not isinstance(separator, bytes) or len(separator) != 1:
Yes, we should only reject empty terminator string. But terminator
strings of more than 1 character are fine, no? I don't think that we
need to put an arbitrary limitation here.
> Since I cannot create pull-request, I will write just here what I want:
Oh, what is your problem? You can use https://github.com/python/asyncio
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25752>
_______________________________________
More information about the Python-bugs-list
mailing list