[Zope-CMF] Re: I gotta ask before I change this, I think.

yuppie y.2006_ at wcm-solutions.de
Thu Apr 6 14:26:08 EDT 2006


Lennart Regebro wrote:
> Would anybody be terribly upset if I changes these snippets of code in
> GenericSetup:
> 
> CONVERTER, DEFAULT, KEY = range(3)
> BASE, EXTENSION = range(1, 3)
> 
> To
> 
> CONVERTER, DEFAULT, KEY = 0, 1, 2
> BASE, EXTENSION = 1, 2
> 
> Which are not only a third as slow (yes, I tested, ;) ) but also a lot
> less confusing?

I guess using random.shuffle would have been more obvious, but also more 
expensive ;)

The whole point was to encourage people to import the names instead of 
relying on the values. But if you add a warning that the values might 
change without further notice I'm fine with the proposed change.

Or do you have a need to use the values? In that case meaningful values 
would be better.

Cheers, Yuppie




More information about the Zope-CMF mailing list