Message258878
>It could be misleading saying “the name of the current package”, because the import could be relative to the a higher level parent package if more than one dot is specified.
While this is correct, Python still uses __package__ to determine what to import in that case. I simply replaced "__package__" with "the name of the current package" to make it easier to read, much as the original text replaces "__name__" with "the name of the current module."
>Then point out that relative imports won’t work with ``python file.py`` or interactive mode, but don’t mention “-m” (or the other ways to run scripts and modules).
SGTM if you can find a reasonable way of phrasing that. |
|
Date |
User |
Action |
Args |
2016-01-24 00:45:27 | Kevin.Norris | set | recipients:
+ Kevin.Norris, docs@python, martin.panter |
2016-01-24 00:45:27 | Kevin.Norris | set | messageid: <1453596327.77.0.270797600669.issue26160@psf.upfronthosting.co.za> |
2016-01-24 00:45:27 | Kevin.Norris | link | issue26160 messages |
2016-01-24 00:45:27 | Kevin.Norris | create | |
|