Multiple values for one key
Maric Michaud
maric at aristote.info
Wed Aug 27 20:40:52 EDT 2008
Le Thursday 28 August 2008 01:56:54 Terry Reedy, vous avez écrit :
> > I'd also like the key to be able to have duplicate entries.
>
> Dict keys must be hashable and unique.
Let's admit they don't have to be unique (it's easy to implement all sort of
data structures in pure python), but what would be the syntax for modifying
an existing value, for example, what should be the result of two consecutive
assignements ?
d[5] = None
d[5] = 0
d[5] == [ None, 0 ] ??
What exactly are you trying to achieve ?
--
_____________
Maric Michaud
More information about the Python-list
mailing list