"Paul Hankin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On Oct 4, 10:53 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: | > However, mapping indexes to names should be more useful: | > | > >>> aNames = dict(enumerate(['foo', 'bar'])) | > >>> aNames | > | > {0: 'foo', 1: 'bar'} | | If you are right that a map from indices to name is best, there's no | need for a dict: the original list already provides such a mapping.
Right. The dict should be reversed, mapping names to indexes, if there were a use. -- http://mail.python.org/mailman/listinfo/python-list