Re: exec("dir()",d)

2009-08-10 Thread Emanuele D'Arrigo
Thank you both for the explanation. As a matter of fact RTFM doesn't -always- help. Sometimes I'm just thick and I can read the manual 10 times and still not understand, as it happened on this particular matter. Your contribution focused my attention on the right bit of the manual which I somehow

Re: exec("dir()",d)

2009-08-09 Thread Christian Heimes
Emanuele D'Arrigo schrieb: Greetings everybody, I don't quite understand why if I do this: d = {} exec("dir()", d) 1) d is no longer empty 2) the content of d now looks like __builtins__.__dict__ but isn't quite it d == __builtins__.__dict__ returns false. Ca

Re: exec("dir()",d)

2009-08-09 Thread Mel
Emanuele D'Arrigo wrote: > Greetings everybody, > > I don't quite understand why if I do this: > >>>> d = {} >>>> exec("dir()", d) > > 1) d is no longer empty > 2) the content of d now looks like __builtins__.__dict__ but is

exec("dir()",d)

2009-08-09 Thread Emanuele D'Arrigo
Greetings everybody, I don't quite understand why if I do this: >>> d = {} >>> exec("dir()", d) 1) d is no longer empty 2) the content of d now looks like __builtins__.__dict__ but isn't quite it d == __builtins__.__dict__ returns false. Can a