Module trouble [newbie]

Diez B. Roggisch deets at nospam.web.de
Fri Feb 23 08:08:06 EST 2007


Boris Ozegovic wrote:

> Diez B. Roggisch wrote:
> 
>> Are you sure the above is what you really used for your test? Because
>> your output features a single 100, which the above lacks a
>> print-statement for.
> 
> Yeah, I cancelled the message, but synchronization allready happened.  :)
> 
> Problem was in some other place.
> 
> One more question: is calling import inside function definition poor
> design?  e.g.
> 
> def foo():
>    doSomething:
>    import someModule
>    someModule.doSomethin

I use it sometimes myself, to avoid otherwise circular imports. However, I
don't like it very much. Try to go without it I'd say, but that is just a
gut-feeling.

Diez



More information about the Python-list mailing list