[Zope-dev] Re: [Zope3-dev] ZConfig: Keytype and section type extension

Fred L. Drake, Jr. fred at zope.com
Mon Dec 29 15:48:03 EST 2003


Phillip J. Eby writes:
 > Well, in that case, can we have a 'getItems()' that returns only the 
 > key-value pairs for actual attributes, and does *not* include keys for 
 > values that weren't explicitly specified in the configuration file and 
 > don't have defaults?

Not a bad idea.  It will require snaking information through
ZConfig.matcher a bit differently, but shouldn't be particularly
difficult.

 > Unless of course the keys were strings rather than Unicode, in which case 
 > it'd be even simpler.

Yes, and so they should be (strings rather than Unicode, that is).
I've changed this in CVS.  It was never intended that identifiers be
Unicode; this was simply an accident of implementation.

 > (The issue here is that Python requires keyword arguments to be
 > strings rather than Unicode, even though attribute names can be
 > Unicode.  ZConfig sets attributes using unicode because ZConfig
 > schemas are XML, and therefore Unicode.)

Annoying, isn't it?  Not sure it's worth fixing in Python.


  -Fred

-- 
Fred L. Drake, Jr.  <fred at zope.com>
PythonLabs at Zope Corporation



More information about the Zope-Dev mailing list