On Wed, Apr 07, 2004, Greg Ewing wrote: > Aahz <aahz at pythoncraft.com>: >> Greg: >>> >>> Would it be unreasonable to define "." as meaning the current >>> *package*, rather than the current *module* -- >> >> Not unreasonable, but I think it complicates the explanation. > > Not if the explanation simply says "'.' refers to the current > package", and leaves the reader to deduce what "current package" means > when the module is not a package. :-) [1] All right, let's try this: A leading dot indicates a relative import, starting with the current package. Two or more leading dots point to the parent(s) of the current package, one level per dot after the first. Then the examples should explain the meaning well enough. -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ Why is this newsgroup different from all other newsgroups?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4