Hello, I would like to confirm that ZConfig keys are case insensitive and that the corresponding attributes on the config object returned by the 'loadConfig' call are always lower case. The only thing that seems relevant about keys and case sensitivity in the documentation does not state it explicitely : '''When this schema is loaded, a set of defaults for the derived section type is computed. Since basic-key is case-insensitive (everything is converted to lower case), ‘foo’ and ‘Foo’ are both converted to ‘foo’, which clashes since key only allows one value for each key.''' Thanks -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be
On Wed, 04 Aug 2004 10:24:30 +0200, Godefroid Chapelle <gotcha@bubblenet.be> wrote:
I would like to confirm that ZConfig keys are case insensitive and that the corresponding attributes on the config object returned by the 'loadConfig' call are always lower case.
It sounds like I need to clarify the documentation a bit. ZConfig schema allow you to change the case-sensitivity by changing the keytype of the schema or of a sectiontype. If you don't use this feature, the "basic-key" type is used, which converts to lower case. The effect is case-insensitivity for the keys. The attributes on the configuration objects, both for the top-level schema and individual sections, are computed by taking the key (after conversion by the keytype) and replacing hyphens with underscores. So a key of "My-Key" is the same as "my-key", and the attribute name will be "my_key". -Fred -- Fred L. Drake, Jr. <fdrake at gmail.com> Zope Corporation
participants (2)
-
Fred Drake -
Godefroid Chapelle