[].keys() and [].items() (Was: Why I think range is a wart)

James_Althoff at i2.com James_Althoff at i2.com
Wed Mar 13 16:01:13 EST 2002


[ruud de rooij[
| perhaps lists should support .keys() and .items() for those operations
| (analogous to dictionaries).

[Clark C . Evans]
| Very nice idea.  This is PEP worthy.  It is nice beacuse it
| does not introduce anything new; a list can easily be viewed
| as a mapping having a positive integer domain.  This is simple,
| consistent, and quite elegant.

I would like to see:
    .keys()
    .items()
    .iterkeys()
    .iteritems()

jim





More information about the Python-list mailing list