Re:Diving into the world of hash tables
by klodolph on Monday June 26, 2017 @01:43AM
(#14634375)
No, that's not how it works internally. The Python compiler resolves all local variables at compile-time. You can see this for yourself by defining a simple function f, import dis, and calling dis.dis(f).
Global variables use a dictionary, however. The disassembly actually looks similar for both.
Global variables use a dictionary, however. The disassembly actually looks similar for both.