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.


Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to