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

Joao S. O. Bueno jsbueno at python.org.br
Tue Apr 5 06:00:26 CEST 2011


On Mon, Apr 4, 2011 at 9:21 PM, Ian Bicking <ianb at colorstudy.com> wrote:
> On Mon, Apr 4, 2011 at 7:14 PM, Steven D'Aprano <steve at pearwood.info> wrote:
>>
>> Ian Bicking wrote:
>>>
>>> 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.

Nonetheless, I can't see as a "dict-view" for this data could
replicate the full order - and be usable
in the sense of using keys.

I think that if one needs the full order as stated, the obvious way to
consume that data is as a sequence
of 2-tuples.

On the other hand, I am +1 for a standardization of this, and for the
implementation of a "dict-view" to an object that otherwise is a
sequence of 2-tuples.

   js
 -><-



More information about the Python-ideas mailing list