[Zope3-dev] Re: __all__ for zope.schema
Tres Seaver
tseaver at palladion.com
Thu Oct 5 09:58:38 EDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Fernando Correa wrote:
> Hi
>
> I was just wondering if it would be interesting to have a __all__ list
> just like zope.interface has.
> This would be cool for someone (like me :-) ) that is trying to get
> all the usable Fields that zope.schema provides.
>
> code:
>
>>>> import zope.interface
>>>> zope.interface.__all__
> ('Interface', 'Attribute', 'implements', 'directlyProvidedBy',
> 'classImplementsOnly', 'implementsOnly', 'moduleProvides',
> 'alsoProvides', 'directlyProvides', 'implementer', 'implementedBy',
> 'noLongerProvides', 'Declaration', 'providedBy', 'classProvides',
> 'classImplements')
>>>> import zope.schema
>>>> zope.schema.__all__
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> AttributeError: 'module' object has no attribute '__all__'
>>>>
>
> I just think that similar approach would give a better index for the
> package.
- -1, mostly becuase '__all__' is primarily intended to support the
'import *' misfeature in Python; any change which encourages 'from
zope.schema import *' cannot be the Right Thing (TM).
Tres.
- --
===================================================================
Tres Seaver +1 202-558-7113 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFJQ+O+gerLs4ltQ4RAgFqAJ0bNiokCcoZcVtda0xo22m/4HmSNwCfZVUX
Teuq8bF0v0SmapXurtQV9iE=
=bSRF
-----END PGP SIGNATURE-----
More information about the Zope3-dev
mailing list