opticspy / lightpipes

LightPipes for Python, "Pure Python version"
https://opticspy.github.io/lightpipes/
BSD 3-Clause "New" or "Revised" License
228 stars 53 forks source link

About LPversion and LPhelp #20

Closed guyskk closed 7 years ago

guyskk commented 7 years ago

from LightPipes import * isn't good practice in python, although it seems nicer in this project, I prefer import LightPipes as lp because it follows the convention of most python libraries.

The biggest problem of import * is it will pollute global namespace, we can add __all__ to __init__.py to avoid this(LPversion and LPhelp look ugly).

Do you prefer convenience or comprehensive?

FredvanGoor commented 7 years ago

I agree, but I think that we have to choose for 'from LightPipes import * ', unless you have a better idea to use 'import LightPipes'. It is also good for the html creation because the 'command-reference' in docs looks nicer. I continue to work on docs and examples. Furthermore I have an idea to put the version number in only one place and to change the LightPipes test method (it is LPtest now in stead of LPversion). The version number appears in 'setup.py' and also in docs/conf.py and is displayed in the html. Now the version number is automatically adjusted in all files. It is in the 'GitHub master' already. Please have a look. LPversion and LPHelp look ugly indeed but version and help are standard in Python.

guyskk commented 7 years ago

OK, I agree from LightPipes import *. But do we really need LPDoc and LPweb?

FredvanGoor commented 7 years ago

I removed LPDoc and LPWeb ...