I've got a bit of code in a function like this:
s=re.sub(r'\n', '\n'+spaces,s)
s=re.sub(r'^',s paces,s)
s=re.sub(r' *\n','\n',s)
s=re.sub(r' *$','',s)
s=re.sub(r'\n*$ ','',s)
Is there any chance that these will be cached somewhere, and save
me the trouble of having to declare some global re's if I don't
want to have them recompiled on each function invocation?
Many TIA!
Mark
--
Mark Harrison
Pixar Animation Studios
s=re.sub(r'\n', '\n'+spaces,s)
s=re.sub(r'^',s paces,s)
s=re.sub(r' *\n','\n',s)
s=re.sub(r' *$','',s)
s=re.sub(r'\n*$ ','',s)
Is there any chance that these will be cached somewhere, and save
me the trouble of having to declare some global re's if I don't
want to have them recompiled on each function invocation?
Many TIA!
Mark
--
Mark Harrison
Pixar Animation Studios
Comment