Re: make zope.component.registry.Components inherit from dict?

Chris McDonough <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <[email protected]>
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

_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.