Re: [Tutor] importing into a function

2013-07-11 Thread Alan Gauld
On 11/07/13 19:47, Jim Mooney wrote: in the DOS box, but there's not much sense in using an IDE at all if it doesn't have everything to make life easy, very sensibly arranged, when you Do need something like a debugger or some snippets (an essential since I have a truly rotten memory ;') You c

Re: [Tutor] importing into a function

2013-07-10 Thread Steven D'Aprano
On 11/07/13 05:02, Jim Mooney wrote: The question is - does importing into a function ever make sense? It occurred to me that if you usefrom module import * , putting it in a function protects you from invisible namespace pollution by a big module with a lot of names. But importing has to b

Re: [Tutor] importing into a function

2013-07-10 Thread Dave Angel
On 07/10/2013 05:16 PM, eryksun wrote: On Wed, Jul 10, 2013 at 3:57 PM, Dave Angel wrote: Sure enough it did. The question is - does importing into a function ever make sense? It occurred to me that if you usefrom module import * , putting it in a function Can't be done. Locals of a fu

Re: [Tutor] importing into a function

2013-07-10 Thread Dave Angel
On 07/10/2013 03:02 PM, Jim Mooney wrote: Boy, is the list busy. Python must have been mentioned on USA today, or something ;') Anyway, I was reading the datamodel, and it mentioned imported modules going out of scope, which seemed odd, since I thought they were global and never went out, or am