[issue25752] asyncio.readline - add customizable line separator
Марк Коренберг
report at bugs.python.org
Fri Nov 27 16:26:38 EST 2015
New submission from Марк Коренберг:
In Python3.5 asyncio.StreamReader.readline() can separate lines only by b'\n'. For some task, I want actually "read until separator", where separator is another byte.
Since I cannot create pull-request, I will write just here what I want:
@coroutine
def readline(self, separator=b'\n'):
if not isinstance(separator, bytes) or len(separator) != 1:
raise ValueError(separator)
....
ichar = self._buffer.find(separator)
....
----------
components: asyncio
messages: 255488
nosy: gvanrossum, haypo, mmarkk, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.readline - add customizable line separator
type: enhancement
versions: Python 3.4, Python 3.5, Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25752>
_______________________________________
More information about the Python-bugs-list
mailing list