Hacker News new | ask | show | jobs
by globular-toast 2240 days ago
It's not really optional. There's just this new thing called namespace packages which is not quite the same. I don't fully understand what it's for yet.
1 comments

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.

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.