-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chris McDonough wrote: > Using an interface class for a constant "container" would often be handy but > it > 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 > intent?
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. - -- =================================================================== 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 iD8DBQFJ2M14+gerLs4ltQ4RAlFtAJoC1a429B5HLcsdoMAlQ3ovjuBUjgCgyTlt GiAEVR//SkkiMO60xn+fHvE= =Mzb/ -----END PGP SIGNATURE----- _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )