Hai Denis,
spir wrote:
"Secure import" means that I, as client of the imported module, know that
this module defines __all__. I can then safely import all. I can even
precisely know which names are defined simply by reading __all__. The common
practice of defining __all__ on top of a module hel
"spir" wrote
"Secure import" means that I, as client of the imported module,
know that this module defines __all__. I can then safely import all.
I still don;t agree that simply defining __all__ means you can
"safely"
import all. all restricts what the module exposes it does nothing to
pre
Le Mon, 26 Jan 2009 22:38:24 -,
"Alan Gauld" a écrit :
> "spir" wrote
>
> > Here are some ideas around import. I wish to receive comments
>
> > The module attribute __all__ allows defining names to be exported.
> > I always use it for my own modules, and also sometimes define it in
> > ext