Cross-reference 'import' in a class hierarchy
Greg Ewing (using news.cis.dfn.de)
ckea25d02 at sneakemail.com
Tue Apr 8 20:56:18 EDT 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
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list