Hacker News new | ask | show | jobs
by greenshackle2 2240 days 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.

2 comments

If the implementation is hard to explain, it's a bad idea.

If the implementation is easy to explain, it may be a good idea.

This is right.