News for hackers. Stuff that matters.
Re:Things to use in Python 3 by j88439h84 on Tuesday May 14, 2019 @11:55PM (#19916276)
The "Implicit namespace packages" item is not correct. Those are for a a specific packaging scenario which doesn't come up in normal usage. Packages should have an __init__.py file in general.
Re:Things to use in Python 3 by giancarlostoro on Wednesday May 15, 2019 @12:06AM (#19916323)
If the file is going to be empty I fail to justify the effort. It is implicitly a package. Is there a case where an empty init file makes sense in Python 3?
Re:Things to use in Python 3 by nerdponx on Wednesday May 15, 2019 @08:30AM (#19918717)
Its absence distinguishes a non-package from a package.
Re:Things to use in Python 3 by eirki on Wednesday May 15, 2019 @06:32AM (#19918036)
Mypy uses the init files to resolve absolute imports.
Re:Things to use in Python 3 by jsmeaton on Wednesday May 15, 2019 @12:07AM (#19916331)
Thanks, this was the only item I wasn't sure about, and reading PEP 420 didn't really make it clear how this would benefit regular applications.