[Python-Dev] locals() different behaviour when tracing? (original) (raw)
Benjamin Peterson benjamin at python.org
Thu Oct 8 16:21:56 CEST 2009
- Previous message: [Python-Dev] locals() different behaviour when tracing?
- Next message: [Python-Dev] locals() different behaviour when tracing?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
2009/10/8 Anders Waldenborg <anders at 0x63.nu>:
Is it intentional that locals() returns a copy/snapshot of the local variables sometimes, and sometimes a reference? Like when enabling tracing, such as in the code pasted below. The documentation ("Update and return a dictionary containing the current scope's local variables.") is pretty unclear.
Yes, it does, and that's why the documentation says changing it is undefined. :)
-- Regards, Benjamin
- Previous message: [Python-Dev] locals() different behaviour when tracing?
- Next message: [Python-Dev] locals() different behaviour when tracing?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]