[Python-Dev] Revising RE docs
fredrik at pythonware.com
Mon Sep 5 13:55:20 CEST 2005
Guido van Rossum wrote:
> I also notice that _compile() is needlessly written as a varargs
> function -- all its uses pass it exactly two arguments.
that's because the function uses  the argument tuple as the cache key,
and I wanted to make the "cache hit" path as fast as possible.
(but that was back in the 1.6 days; things have changed a lot since then, so
maybe someone should benchmark some alternative ways to do this under
1) well, it used to use it. the code was modified slightly in 2.3 to prepend
the type of the pattern string; not sure why, since 8-bit and unicode patterns
should be equivalent.
More information about the Python-Dev