"tiissa" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Variables are stored in two dictionnaries: globals() (for global > variables) and locals() (for the local ones, which are also global on > top level).
Within a function, the local namespace is usually *not* a dictionary. D=locals() makes a dictionary copy of the namespace, which takes more time than one might expect, and which has the trap that changes to D do *not* affect the namespace itself. So the try..except idiom is faster and does not have that particular trap. Terry J. Reedy -- http://mail.python.org/mailman/listinfo/python-list