[Zope-dev] make zope.component.registry.Components inherit from dict?

Chris McDonough chrism at plope.com
Tue Nov 24 01:24:03 EST 2009


Martin Aspeli wrote:
>> Meh, I just remembered that I tried this.  The current implementation requires 
>> that the "name" value be a literal string object (or at least something 
>> convertable to Unicode).  I think we could relax this requirement; it really 
>> only needs to be hashable.  I wouldn't want to deploy the API if the keys were 
>> required to only be strings.
> 
> Should be easy to fix, I'm sure. Why would you want something other than 
> strings, though?

For the same reasons that dictionaries accept keys other than strings.  In this 
case, more specifically, we're trying to give Python programmers a familiar API 
without any special restrictions that require "homina homina" documentation.

- C



More information about the Zope-Dev mailing list