Re: [Python-ideas] Add function readbyte to asyncio.StreamReader

2018-07-27 Thread Jörn Heissler
On Mon, Jul 23, 2018 at 22:25:14 +0100, Gustavo Carneiro wrote: > Well, even if it is worth, i.e. your use case is not rare enough, Reading a single byte is certainly a special case, but I think it's generic enough to warrant its own function. I believe there should be many binary protocols out th

Re: [Python-ideas] Python docs page: In what ways is None special

2018-07-23 Thread Jörn Heissler
m functions that don’t explicitly return anything. Its truth value is false. Cheers Jörn Heissler ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

[Python-ideas] Add function readbyte to asyncio.StreamReader

2018-07-22 Thread Jörn Heissler
Hello, I'm implementing a protocol where I need to read individual bytes until a condition is met (value & 0x80 == 0). My current approach is: value = (await reader.readexactly(1))[0] To speed this up, I propose that a new function is added to asyncio.StreamReader: value = await reader.readbyte(