[Python-ideas] Support parsing stream with `re`
jfine2358 at gmail.com
Sun Oct 7 13:13:22 EDT 2018
> An mmap object is one of the things you can make a memoryview of,
> although looking again, it seems you don't even need to, you can
> just re.search the mmap object directly.
> re.search'ing the mmap object means the operating system takes care of
> the streaming for you, reading in parts of the file only as necessary.
Provided mmap releases memory when possible, this is a good solution,
and probably in many cases better than the one I suggested. And closer
to what the original poster asked for.
So I've learnt something. Thank you all.
More information about the Python-ideas