Marien Zwart <m_zw...@123mail.org> added the comment:

That fixes the first problem in python 2. It should do:

self.matching_blocks = [Match._make(t) for t in non_adjacent]

in python 3 though, or it will return an already-exhausted map object if it is 
called again.

This leaves the problem of other code mutating the cached list (not realizing 
it is cached). I think it would make sense for these functions to just return a 
shallow copy of their cached list, but I have not thought that through much.

----------

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

Reply via email to