Cross-reference 'import' in a class hierarchy

Greg Ewing (using news.cis.dfn.de) ckea25d02 at sneakemail.com
Mon Apr 7 23:44:10 EDT 2003


Ben Finney wrote:
> I feel dim for not being able to see the answer, but it seems absurd to
> me that one can't rename a directory and expect the scripts within it to
> continue working without outside help.

It's been suggested before (and I happen to agree) that
Python should provide a general way of making *relative*
references to modules or packages. You can do this
already for a module that resides directly in the same
package as the module doing the importing, but for
anything else you must use an absolute path from the
"root package".

However, the response so far from the BDFL has only
been "Why would you want such a thing?", which is
unfortunate, because I find it hard to understand how
someone could think you *wouldn't* want it.

I'm hoping that someday he will see the light...

-- 
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