[Zope-CMF] Re: [dev] CMFSetup: proposal for improving handlers

yuppie y.2004_ at wcm-solutions.de
Fri Dec 17 05:07:04 EST 2004

Dieter Maurer wrote:
> yuppie wrote at 2004-12-13 09:50 +0100:
>>I started my prototype with explicit dictionary keys like here:
>>    { 'permission': {'key': 'permissions', 'default': ()} }
>>But I replaced them later with constants imported from one place to 
>>catch typos easily.
> For an example, it is better to use the string constants literally
> rather than hiding them behind constants.

Why? The pattern I chose is used in many places. And it makes sure you 
get an error if you misspelled a name.

The values behind the constants are meaningless:

     CONVERTER, DEFAULT, KEY = range(3)

Cheers, Yuppie

BTW: Meanwhile I checked in my changes.

More information about the Zope-CMF mailing list