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 <rep...@bugs.python.org>
<http://bugs.python.org/issue25752>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to