On Thu, Oct 16, 2008 at 8:55 PM, Mike Orr <[EMAIL PROTECTED]> wrote:
>
> On Thu, Oct 16, 2008 at 4:12 AM, Tomasz Nazar <[EMAIL PROTECTED]> wrote:
>> Cyclic dependencies do not work just that simple. "Cyclic" imports
>> unfortunately have to placed inside a method - not at the top of
>> module.
>
> Importing in a function is the best way to deal with cyclic imports,
> yes.  Although even better is to avoid them entirely.

Yes. Of course it is :)
It's a matter of taste. I don't like having imports inside a method,
though sometimes that's the only way..


> Why do conference and participant have to import each other?  Neither
> is using the other as its base class.  If  you have a tight
> relationship between two classes like this, it's a good reason to put
> them in the same module.

That was just a fake example to test if that works.
In real examples I have few such situations and I won't elaborate on that.
I feel sorry that Python import works this way. It's just the way it
is.. So I look for best method to work round that.
I do not have and don't want to design my classes and modules in a
tree like graph. IMHO Python forces me here too much - and my nature
is to resist when pushed too much ;)

T.



-- 
_i______'simplicity_is_the_key'__________tomasz_nazar
_ii____'i_am_concern_oriented'________________JKM-UPR
_iii__'patsystem.sf.net'___________________linux_user
_'aspectized.com'___________________________prevayler

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to