-----BEGIN PGP SIGNED MESSAGE-----
Chris McDonough wrote:
> Using an interface class for a constant "container" would often be handy but
> might be an inappropriate use of interface classes. FTR, I do often put
> constants in an "interfaces.py" module at module scope (if there are more than
> one related, sometimes in a dictionary or within a non-interface class
> statement) in order to not feel I need to create some "constants.py" module.
> Maybe we could just agree that doing so isn't some sort of violation of
If constants are part of the spec for an interface, then placing them at
module scope as peers of the interface seems fine to me. In that case,
the docstrings of one or methods would presumably refer to them, e.g.
describing allowed valeus for an argument.
Using a "real" class as a container for them seems over-fancy for my taste.
Tres Seaver +1 540-429-0999 tsea...@palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -