Xiang Zhang added the comment:

Although Serhiy thinks we need a separate class for this but I still want to 
upload my patch first. Maybe some of it can be helpful later, or garbage.

I add a mmap_contains to fix the in operator's behaviour (I don't find the 
separate issue). I use the simplest search method which is O(m*n). Previously I 
thought it is not acceptable but I find out that mmap_gfind goes this way too.

By the way, only operations related to mmap_item are affected, which I can see 
is iteration and in (search does not need to iterate since there is find 
method), indexing is not affected. So maybe this does not break the backward 
compatibility that hard.

Hope no disturb.

----------
keywords: +patch
Added file: http://bugs.python.org/file42647/mmap_bytearray_like.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26358>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to