Re: TreeVocabulary in zope.schema.vocabulary

Jan-Carel Brand <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Organization Opkode
Message-ID <1327932411.11479.55.camel@toaster>
On Fri, 2012-01-27 at 11:50 +0100, Souheil CHELFOUH wrote:
> Yes, Marius got exactly what I meant, this is how I usually make the
> not-so-pluggable stuff pluggable :)
> About the fact to release it out of zope.schema, it's also to be able
> to make it live a bit and prove itself.
> Then, including it and changing the API can be easily justified. I'm
> not afraid of the changes in zope.schema.
> z3c.form is not the only form option, I'll probably use it in
> dolmen.forms that came from zeam.form.
> So, whatever you decide, we'll try to make it easy for you to contribute.
> It tends to get tooooo complicated to do anything in zope, lately :)

Ok, I've implemented the idea of the dict_factory, making sure to
implement all the methods required by IEnumerableMapping and
IReadMapping. All tests pass and it works in my specific end use-case.

However, since we can use the OrderedDict type in Python < 2.7 by means
of the ordereddict package, what do you think of making that the default
dict type and adding an 'ordereddict' dependency for older Python
versions? (Please see Charlie and my discussion about it.)

If we still use the concept of a dict_factory, it wouldn't make sense to
implement the OrderedDict specific methods like "popItem", but the
"keys" method would be ordered, which I think would be enough.


J-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.