4 ms·
empty __init__.py declare a python module. see http://stackoverflow.com/questions/448271/what-is-init-py-for http://stackoverflow.com/questions/448271/what-is-i
by je42 12y ago
empty __init__.py declare a python module. see http://stackoverflow.com/questions/448271/what-is-init-py-for http://stackoverflow.com/questions/448271/what-is-init-py-fo...
- jzwinck 12y agoI am well aware of why an empty __init__.py is necessary. It is less clear why one must add license boilerplate to such a file: https://github.com/reddit/reddit/blob/master/r2/r2/config/__init__.py https://github.com/reddit/reddit/blob/master/r2/r2/config/__... > you may not use this file except in compliance with the License This is patently absurd: the file contains no content other than the license itself, and arguably its name (which is shared by millions of other __init__.py files around the world).
- je42 12y agoAh. Sorry, I didn't understand this point. I agree it is totally superfluous to declare a license on an empty file. But I assume that they have this header on every file as part of their internal process. Hence, they don't make an exception for empty files. I would book it as a cost of this process. Also, it is handy if somebody starts appending to it ( i.e. https://github.com/reddit/reddit/blob/master/r2/r2/lib/authorize/__init__.py https://github.com/reddit/reddit/blob/master/r2/r2/lib/autho... ) , they don't need to take care of that the license is correct.
- jvoorhis 12y agoAn empty file with no surrounding context is just an empty file, but is an otherwise blank file embedded within proprietary software whose presence is required for the software to function somehow public domain? The contents of the file are trivial, but it's existence may not be.