You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vars() assignment fails silently when assignments made later #49447
Activity
pest commentedon Feb 10, 2009
Assignments to vars() behave incorrectly if those variables are use
later on in a function.
For example, try this:
======
#!/usr/bin/python
======
The assignments work fine up till 4_2. At 4_2, the assignment apparently
fails silently, and the print raises a keyError exception.
ocean-city commentedon Feb 10, 2009
According to http://docs.python.org/library/functions.html#vars
Same can be said for locals() as well.