[Zope-dev] ZConfig keys

2004-08-04 Thread Godefroid Chapelle
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
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )


Re: [Zope-dev] ZConfig keys

2004-08-04 Thread Fred Drake
On Wed, 04 Aug 2004 10:24:30 +0200, Godefroid Chapelle
[EMAIL PROTECTED] 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
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )