2 ms·
> That's not exactly how C works Sure, I elided a bajillion details, and who knows what the CPU is doing under the hood anyway? :) I've never used rust (yet)
by carapace 6y ago
> That's not exactly how C works
Sure, I elided a bajillion details, and who knows what the CPU is doing under the hood anyway? :)
I've never used rust (yet) so I can't really comment on that.
FWIW namespaces in Python aren't abstract, they exist as dicts at runtime. You can modify the dict you get back from locals() or globals() and change your "variables" in scope:
>>> d = locals()
>>> d['cats'] = 'meow'
>>> cats
'meow'