Closed dlmueller closed 10 years ago
So, I have to import everything I import with a name change to keep it from being exported? Python has no other way to limit that?
The new test fails on Python 3
Also, thanks for working on this!
So, I have to import everything I import with a name change to keep it from being exported? Python has no other way to limit that?
My fault. The following statements should be correkt:
dir(somepackage)
all members are listed. Regardless of any leading underscores.from somepackage import *
__all__
variable can be used to explicit enumerate the members of the public API.__all__
variable, than only members with leading underscore will be hidden.I've resolved the Python 3 issues (testet with Python 3.4.1).
I've added the 'enarmor' function including a unit test.
Currently the public API visible via "dir(OpenPGP)" is polluted with imported standard modules. A user of OpenPGP-Python might think they belong to the "intentinally published API" an uses them, e.g. "OpenPGP.unpack".
This problem could be solved when those module are renamed on import with a leading underscore using the "as"-keyword. This way they would be hidden in the result of "dir(OpenPGP)". So only the real published API remains visible. I think that would clarify usage a lot.