[Python-Dev] Deletion order when leaving a scope? (original) (raw)

Larry Hastings larry at hastings.org
Thu Jan 18 01:57:54 CET 2007


I just ran a quickie experiment and determined: when leaving a scope, variables are deleted FIFO, aka in the same order they were created.
This surprised me; I'd expected them to be deleted LIFO, aka last first. Why is it thus? Is this behavior an important feature or an irrelevant side-effect?

Cheers,

/larry/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20070117/4b9c5cc3/attachment.html



More information about the Python-Dev mailing list