[Python-Dev] Deletion order when leaving a scope?
ptmcg at austin.rr._bogus_.com
Thu Jan 18 07:34:03 CET 2007
"Calvin Spealman" <ironfroggy at gmail.com> wrote in message
news:mailman.2860.1169086798.32031.python-list at python.org...
> Absolutely an irrelevent side effect, especially when you take into
> consideration the 4 and counting alternative implementations of the
> None the less, I can explain why it is as it is, keeping in mind its
> not like that on purpose, its just how it is. Locals are optimized
> into an array for fast lookup. Every name assigned to in a function is
> known as a local in that function and this internal array holds its
> reference. It is simply a product of the array indexes and deletion
> order being the same, 0 to N.
Oh good! Now I can write code that relies on this behavior!
More information about the Python-list