Replacement for locals() ???

Skip Montanaro skip at pobox.com
Fri Jul 30 16:08:33 CEST 2004


    Harald> I read within psysco-FAQ and Jim Hugoninis IronPython paper: a
    Harald> lot of words about "locals() being very difficult or impossible
    Harald> to optimize"

    Harald> AND UNTIL

    Harald> so ... is there any convenient replacement? Of course I could do

    Harald> {"id":id, "surename":surename} , but that would be very very
    Harald> in-elegant.

That's the only solution I've found so far.  Makes for rather ugly code.  If
you have to choose, what do you want, fast or pretty? <wink>

Skip



More information about the Python-list mailing list