3 ms·
Namespace packages let you ship `foo.bar` and `foo.baz` separately. `bar` and `baz` are really two separate packages that are both part of the `foo` namespace.
by greenshackle2 6y ago
Namespace packages let you ship `foo.bar` and `foo.baz` separately. `bar` and `baz` are really two separate packages that are both part of the `foo` namespace. `foo` is not a real package.
They are not new but implicit namespace packages are new-ish. Before 3.3 it was more complicated to set up, now you just omit __init__.py from `foo`.
I don't see any reason to use this if `foo` is shipped as a single package.
- j88439h84 6y agoThis is right.
- earthboundkid 6y agoIf the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea.