Create a Dreamwidth Account
Site and Account
Reload page in style:
2013-04-18 11:18 pm (UTC)
[preemptive tl;dr reply after the first couple paragraphs]
Earlier today I learned another new and horrible thing about Python's complete and utter lack of namespace hygiene. Namely: because modules are just dictionaries, the current module is too, which means that modules are just dictionaries stored in a local variable. This in turn means that if you use a local variable of the same name as the module you imported, it can squash the module import. There appears to be some black magic to try to hide this fact, which only makes it worse since it means top-level local variables don't cause the problem, but local variables in function definitions do!
Thread from start
This account has disabled anonymous posting.
You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address.
Sign in using OpenID
If you don't have an account you can
create one now
HTML doesn't work in the subject.
Check spelling during preview
This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.
Expand Cut Tags
No cut tags
Page generated Oct. 20th, 2017 08:31 am
Top of page