3 Commits

Author SHA1 Message Date
Floris Lambrechts
cb6ec31e33 Rename __version__.py to _version.py
This avoids a name collision with mypackage.__version__
(the string).

In addition, the single underscore shows it's a 'private' module
that has no special meaning to the Python interpreter.
2018-12-16 21:39:00 +01:00
Floris Lambrechts
aa60dc88c2 Make __version__ a module-level attribute
By moving __version__ to __init__.py, it becomes an attribute of the
module.  This is recommended in PEP 396 and a common practice in many
contemporary packages.

This enables the following:

>>> import mypackage
>>> print(mypackage.__version__)
'5.2.0'
2018-07-26 14:58:28 +02:00
Kenneth Reitz
0d4f903f8b Create __init__.py 2017-08-28 12:11:05 -04:00