[Python-ideas] Dict view on list of two-tuples

Ian Bicking ianb at colorstudy.com
Tue Apr 5 01:51:38 CEST 2011


On Mon, Apr 4, 2011 at 5:56 PM, Steven D'Aprano <steve at pearwood.info> wrote:

> Data structures with an internal representation like {'a':
>> ['1', '3'], 'b': ['2']} are not sufficient.
>>
>
> How do you know? The ordered dict implementation in the standard library
> has an internal dict representation (or at least it did, when it was on
> ActiveState). Why do you care whether the implementation uses a dict
> internally, so long as the interface matches the specified (and as yet not
> entirely decided) API?


Well, I can say at least that it would not be sufficient for me to use it in
WebOb -- I wouldn't consider it acceptable to lose the full ordering of all
keys, as would happen if you used this structure.  It might be suitable for
some other use, but I have no such use in mind at the moment, so diverging
from this it would no longer be the idea that led me to start the thread ;)

  Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20110404/995f3a10/attachment.html>


More information about the Python-ideas mailing list