Message297796
That part of the PEP was never implemented - relative imports have never been allowed to cross package boundaries in practice (which is also why "from . import sys" doesn't work as an equivalent to "import sys" at the interactive prompt or in a top level module).
Rather than amending the PEP, my inclination is to drop that cross-reference from the documentation, and instead add a new subsection to https://docs.python.org/3/reference/import.html covering "Package relative imports"
The key section that needs to be extracted is https://www.python.org/dev/peps/pep-0328/#guido-s-decision (minus the part about cross-package relative imports being permitted).
The following section about __name__ is also worth including but needs to be updated to account for __package__ (added by PEP 366), and __spec__ (added by PEP 451). |
|
Date |
User |
Action |
Args |
2017-07-06 03:58:09 | ncoghlan | set | recipients:
+ ncoghlan, brett.cannon, docs@python, eric.snow, Malcolm Smith |
2017-07-06 03:58:09 | ncoghlan | set | messageid: <1499313489.24.0.268319834386.issue30840@psf.upfronthosting.co.za> |
2017-07-06 03:58:09 | ncoghlan | link | issue30840 messages |
2017-07-06 03:58:08 | ncoghlan | create | |
|