3 ms·
That only "works" for the global scope, or by chance in some cases in the local scope if you do a star-import within the local scope (yeah…) I don't consider t
by masklinn 14y ago
That only "works" for the global scope, or by chance in some cases in the local scope if you do a star-import within the local scope (yeah…)
I don't consider that working, it's a piling up of hacks. Which is great when you need them and they work, but...
Also, there's a simpler way to implement your snippet:
globals().__setitem__('spam','eggs')
- deleted 14y ago[deleted]