raymond.hettinger@gmail.com> wrote:
> Instead, the data should be organized as follows:
>
> � � indices = �[None, 1, None, None, None, 0, None, 2]
> � � entries = �[[-9092791511155847987, 'timmy', 'red'],
> � � � � � � � � [-8522787127447073495, 'barry', 'green'],
> � � � � � � � � [-6480567542315338377, 'guido', 'blue']]

As a side note, your suggestion also enables order-preserving
dictionaries: iter() would automatically yield items in the order they
were inserted, as long as there was no deletion. �People will
immediately start relying on this "feature"... �and be confused by the
behavior of deletion. :-/

I'm not sure about "relying" cause currently Python supports this feature only with OrderedDict object. So it's common for python developers do not rely on inserting ordering when using generic dict.
">

(original) (raw)

Hi!


2012/12/10 Armin Rigo <arigo@tunes.org>

Hi Raymond,


On Mon, Dec 10, 2012 at 2:44 AM, Raymond Hettinger
<raymond.hettinger@gmail.com> wrote:
\> Instead, the data should be organized as follows:
\>
\> � � indices = �\[None, 1, None, None, None, 0, None, 2\]
\> � � entries = �\[\[-9092791511155847987, 'timmy', 'red'\],
\> � � � � � � � � \[-8522787127447073495, 'barry', 'green'\],
\> � � � � � � � � \[-6480567542315338377, 'guido', 'blue'\]\]

As a side note, your suggestion also enables order-preserving
dictionaries: iter() would automatically yield items in the order they
were inserted, as long as there was no deletion. �People will
immediately start relying on this "feature"... �and be confused by the
behavior of deletion. :-/

I'm not sure about "relying" cause currently Python supports this feature only with OrderedDict object. So it's common for python developers do not rely on inserting ordering when using generic dict.

A bient�t,

Armin.
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/kachayev%40gmail.com



--
Kind regards,
Alexey S. Kachayev,�
CTO at Kitapps Inc.
----------
http://codemehanika.org

Skype: kachayev
Tel: +380-996692092