On 3/17/2011 3:53 PM, Aahz wrote:
In article<753e9884-60eb-43cf-a647-12b29ed28...@y31g2000prd.googlegroups.com>,
Santiago Caracol<santiago.cara...@gmail.com>  wrote:
Don't do that. =A0;-) =A0I suggest using exec instead. =A0However, I wo=
uld be
surprised if import worked faster than, say, JSON (more precisely, I
doubt that it's enough faster to warrnat this kludge).

I'm with Aahz. =A0Don't do that.
>>
I didn't find a good way to calculate and compile the regular
expressions once and store them.

   Hm. Regular expression compilation in CPython happens when
you call "re.compile", not when .pyc files are generated.
You can call "re.compile" on strings read from an external
source without loading a new module.

                                John Nagle
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to