Cross-reference 'import' in a class hierarchy

Greg Ewing (using ckea25d02 at
Wed Apr 9 02:56:18 CEST 2003

Jp Calderone wrote:
>   It's simple.  Code should not depend directly on code higher than it in
> the package hierarchy.  If it does (and it isn't one of a few extremely rare
> cases), it is misdesigned.

But it's worse than that -- you can't even refer to things
*deeper* in the hierarchy relative to yourself.

It's like having a Unix where you can say "spam" or
"/bar/spam/foo" but not "spam/foo".

Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand

More information about the Python-list mailing list