[Tutor] Global namespace/dictionary

2013-12-22 Thread Keith Winston
On Sun, Dec 22, 2013 at 6:00 AM, wrote: > They have to live somewhere. Don't we all. Thanks, this helped clarify, I'll experiment more... -- Keith ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.p

[Tutor] Global namespace/dictionary

2013-12-22 Thread Keith Winston
On Sun, Dec 22, 2013 at 6:00 AM, wrote: > They have to live somewhere. -- Keith ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Global namespace/dictionary

2013-12-22 Thread Steven D'Aprano
On Sat, Dec 21, 2013 at 02:22:32PM -0500, Keith Winston wrote: > On Sat, Dec 21, 2013 at 12:56 PM, wrote: > > > py> x = 23 > > py> d = globals() > > py> d['x'] > > 23 > > py> d['x'] = 42 > > py> x > > 42 > > > > > Well this is sort of fascinating, but a bit confusing: I was playing with > this,

Re: [Tutor] Global namespace/dictionary

2013-12-21 Thread Dave Angel
On Sat, 21 Dec 2013 14:22:32 -0500, Keith Winston wrote: Tutor maillist - Tutor@python.org Please stick with text mail, not html. -- DaveA ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.

[Tutor] Global namespace/dictionary

2013-12-21 Thread Keith Winston
On Sat, Dec 21, 2013 at 12:56 PM, wrote: > py> x = 23 > py> d = globals() > py> d['x'] > 23 > py> d['x'] = 42 > py> x > 42 > Well this is sort of fascinating, but a bit confusing: I was playing with this, and it seems like the global dictionary includes not just the name but the entire contents