Re: [Tutor] reciprocal import

2008-12-16 Thread Alan Gauld
"spir" wrote Actually, I have 2 main modules that work together to achieve the task. In the first one(A) is defined a set of objects that outline the creation of objects which classes & subclasses are in the second module(B). So far so good. A needs to import B but B does not need to impor

Re: [Tutor] reciprocal import

2008-12-16 Thread Steve Willoughby
spir wrote: Steve & Kent: Actually, I have 2 main modules that work together to achieve the task. In the first one is defined a set of objects that outline the creation of objects which classes & subclasses are in the second module. Only for clarity I need two modules. In my experience (and I r

Re: [Tutor] reciprocal import

2008-12-16 Thread spir
Steve & Kent: Actually, I have 2 main modules that work together to achieve the task. In the first one is defined a set of objects that outline the creation of objects which classes & subclasses are in the second module. Only for clarity I need two modules. A third one copes with exceptions -- so i

Re: [Tutor] reciprocal import

2008-12-16 Thread christopher . henk
rt at the module level. Chris Steve Willoughby Sent by: tutor-bounces+christopher.henk=allisontransmission@python.org 12/16/2008 03:08 PM To spir cc *tutor Subject Re: [Tutor] reciprocal import spir wrote: > Is it legal or possible at all for two modules to import each other? I

Re: [Tutor] reciprocal import

2008-12-16 Thread Kent Johnson
On Tue, Dec 16, 2008 at 3:06 PM, spir wrote: > Is it legal or possible at all for two modules to import each other? I > tried several ways and had several kinds of error messages. Usually > "can't import...". It is possible but better to avoid it, perhaps by putting common functionality into a t

Re: [Tutor] reciprocal import

2008-12-16 Thread Steve Willoughby
spir wrote: Is it legal or possible at all for two modules to import each other? I tried several ways and had several kinds of error messages. Usually "can't import...". My first impression here is that this sounds like a bad class/module design if they're really that interdependent. ___

[Tutor] reciprocal import

2008-12-16 Thread spir
Is it legal or possible at all for two modules to import each other? I tried several ways and had several kinds of error messages. Usually "can't import...". Denis ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor