[Python-Dev] Re: Relative import (original) (raw)
Greg Ewing greg at cosc.canterbury.ac.nz
Thu Dec 18 16:57:39 EST 2003
- Previous message: [Python-Dev] Got None. Maybe Some?
- Next message: [Python-Dev] Re: Relative import
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Paul Moore <pf_moore at yahoo.co.uk>:
If that's what you'd like a vote on, I prefer the triple-dot proposal.
How would you spell relative references to parent packages using the triple-dot version? Remember we've dropped the idea of search-upwards, so that would have to be made explicit somehow.
pkg_init.py:_ print "importing pkg" import a pkg\a.py: print "importing a" import b pkg\b.py: print "importing b"
>>> import pkg importing pkg importing a importing b Is the proposal that any of this stop working?
I think the proposal is for it to keep working for backwards compatibility now, but to stop working in Python 3.0. Is that correct?
Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+
- Previous message: [Python-Dev] Got None. Maybe Some?
- Next message: [Python-Dev] Re: Relative import
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]