On Fri, Jan 8, 2010 at 6:27 AM, Antoine Pitrou <solipsis at pitrou.net> wrote: > Le Thu, 07 Jan 2010 22:11:36 +0100, Martin v. Löwis a écrit : >> >> Even if we do use the new API, and correctly, it still might be >> confusing if the contents of the buffer changes underneath. > > Well, no more confusing than when you compute a SHA1 hash or zlib- > compress the buffer, is it? That depends. Algorithms that make exactly one pass over the buffer will run fine (maybe producing a meaningless result). But the regex matcher may scan the buffer repeatedly (for backtracking purposes) and it would take a considerable analysis to prove that cannot mess up its internal data structures if the data underneath changes. (I give it a decent chance that it's fine, but since it was written without ever considering this possibility I'm not 100% sure.) -- --Guido van Rossum (python.org/~guido)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4