Eric Snow added the comment:

Thanks for speaking up, Antoine.  Keep in mind that a C implementation of 
OrderedDict has a strict compatibility requirement with the existing pure 
Python one.  The Python implementation subclasses dict so the C implementation 
must as well.  I agree that it would be simpler otherwise.  It would have saved 
me a lot of headache!

As to the linked list implementation, it does the job.  I'm not trying to blaze 
any trails with this code.  Furthermore, my implementation does not preclude a 
better one replacing it.  I would welcome a better implementation.  Until that 
appears, my implementation is what there is. :)  Frankly, my interest does not 
lie in the a C OrderedDict, but in what I want to do one we have one.  Since no 
one was willing to do that for me <wink>, I did it myself.

That said, I feel like my implementation satisfies what is required and does so 
in a way that we can be satisfied with it indefinitely.  It sounds like you 
feel it would be worse to land it than to not have a C implementation of 
OrderedDict.  Obviously I don't feel the same way. :)  Regardless, I think we 
both feel the same way that the amount of time I've spent on this shouldn't 
factor into determining that.

Aside from subclassing dict and my linked list approach, do you have any other 
concerns?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16991>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to