[Python-Dev] Better module shutdown procedure (original) (raw)
Daniel Stutzbach daniel at stutzbachenterprises.com
Thu Oct 15 00:35:38 CEST 2009
- Previous message: [Python-Dev] Better module shutdown procedure
- Next message: [Python-Dev] Better module shutdown procedure
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Oct 14, 2009 at 4:42 PM, Neil Schemenauer <nas at arctrix.com> wrote:
Yes, it does still resort to setting globals to None. However, the weakref step makes it much more likely that del methods run before that happens. After this change, referencing global variables from del methods is okay.
The first and last sentences seem like a contradiction to me. If I cannot guarantee that globals will be valid when del is executed, then I must not reference globals from del.
I think I'm missing something here. Is there some way the programmer can determine that referencing a global variable in del will be 100% safe? (not just "likely")
-- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20091014/1451f724/attachment.htm>
- Previous message: [Python-Dev] Better module shutdown procedure
- Next message: [Python-Dev] Better module shutdown procedure
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]