Replacement for locals() ???
skip at pobox.com
Sat Jul 31 05:36:39 CEST 2004
>> So two of the greatest PythonBrains have problems in optimizing
>> Python because of locals(), the most common usage of Python in my
>> practice is peripheral; so just by way of precaution I am looking for
>> a replacement.
Terry> I suspect you are very prematurely optimizing. Since you are
Terry> filling out SQL statements, I would expect that your bottlenecks
Terry> are and will be the execution of the statements, and not the
Terry> construction of the statements.
Perhaps he is, however I think the presence of locals() in a function
prevents one from using Psyco on that program if the function is executed.
It may even (I don't recall off the top of my head and don't have immediate
access to Intel hdwe to try it on) crash the program.
More information about the Python-list