Open avelino opened 6 years ago
You'd have my support for explicit import!
The current way unnecessarily hides information.
What's your concrete suggestion?
My suggested is explicit import, not more proxy (bottle.ext.)
I think there are many examples already doing that.
I think that explicit import is the best way to go for many reasons. Although I believe that python "magic" could work in some scenarios to provide a nice API, in this case i agree that explicit import in this case is better. For instance:
1) New (python) users that chose bottle.py for a single project for it's simplicity should not have to deal with this.
2) Decouple from package management: Instead of
from bottle.ext.jwt import JWTPLugin
the equilevant
from bottle_jwt import JWTPlugin
is more clear. Image the confusion with two different plugins with similar name conventions.
@defnull what you opinion?
example:
It is not very pythonic, we are bringing spells (not leaving explicit where the package comes from).
This python:
What's your opinions?