Python Packages¶
Following is from David Beazley's talk.
-
Explicit relative imports make refactoring of packages easier
👆 works, but, if we want to rename the
spam
package, we'd have to go in the code and refactor the import above.Relative imports make this easier.
Use leading
.
to move up the hierarchy.