OK to memoize re objects?

Nobody nobody at nowhere.com
Mon Sep 21 11:02:30 EDT 2009


On Mon, 21 Sep 2009 07:11:36 -0700, Ethan Furman wrote:

> Looking in the code for re in 2.5:

> _MAXCACHE = 100

> On the other hand, I (a
> re novice, to be sure) have only used between two to five in any one
> program... it'll be a while before I hit _MAXCACHE!

Do you know how many REs import-ed modules are using? The cache isn't
reserved for __main__.




More information about the Python-list mailing list