Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #31041
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2012-10-09 08:36 -0700 |
| References | <40ac555b-71c2-445e-814b-6bd1d037dbee@googlegroups.com> <mailman.2006.1349796256.27098.python-list@python.org> |
| Subject | Re: surprising behaviour of global dictionaries |
| From | Michele Simionato <michele.simionato@gmail.com> |
| Message-ID | <mailman.2007.1349797021.27098.python-list@python.org> (permalink) |
On Tuesday, October 9, 2012 5:24:17 PM UTC+2, Peter Otten wrote: > Seriously, you shouldn't use the main script as a library; it is put into > > the sys.modules cache under the "__main__" key. Subsequent imports under its > > real name will not find that name in the cache and import another instance > > of the module, with puzzling effects Actually I usually never use the main script as a library, this is why I never experience this puzzling behavior before. But now it is clear, thanks.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
surprising behaviour of global dictionaries Michele Simionato <michele.simionato@gmail.com> - 2012-10-09 08:08 -0700
Re: surprising behaviour of global dictionaries Peter Otten <__peter__@web.de> - 2012-10-09 17:24 +0200
Re: surprising behaviour of global dictionaries Michele Simionato <michele.simionato@gmail.com> - 2012-10-09 08:36 -0700
Re: surprising behaviour of global dictionaries Dave Angel <d@davea.name> - 2012-10-09 12:10 -0400
Re: surprising behaviour of global dictionaries Michele Simionato <michele.simionato@gmail.com> - 2012-10-09 08:36 -0700
Re: surprising behaviour of global dictionaries Grant Edwards <invalid@invalid.invalid> - 2012-10-09 15:53 +0000
Re: surprising behaviour of global dictionaries Peter Otten <__peter__@web.de> - 2012-10-09 19:45 +0200
csiph-web