[issue19087] bytearray front-slicing not optimized

Antoine Pitrou report at bugs.python.org
Wed Sep 25 23:28:22 CEST 2013


Antoine Pitrou added the comment:

> Could you please provide an example which uses this feature?

A generic example is to parse messages out of a TCP stream. Basically
any protocol transported on TCP needs such a facility, or has to find
workarounds (which are either suboptimal or complicated).

Mercurial has another implementation strategy for a similar thing:
http://selenic.com/repo/hg/file/50d721553198/mercurial/util.py#l935

----------

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


More information about the Python-bugs-list mailing list