Antoine Pitrou added the comment: > And the same is for a list. List and bytearray are wrong types for > front deleting.
There is no bytedeque(). > I don't think we should increase the size of > bytearray, and complicate and slowdown it for such special purpose. I don't think it would really slow it down. It should be a simple optimization. And FIFO buffers are quite common when writing parsers for network applications. > If you want to implement a fifo using bytearray more optimal, defer > the deleting until used size less than a half of allocated size. See > for example XMLPullParser.read_events() in > Lib/xml/etree/ElementTree.py. Of course, I wrote that code. Still, doing it manually is suboptimal and cumbersome when it could be done transparently. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19087> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com