dictionary object

Aahz Maruch aahz at netcom.com
Mon May 10 15:03:19 EDT 1999


In article <slrn7je7s3.6n.diego at blanka2.blankanet.it>,
Diego Dainese  <ddainese40x at x44dsi.unive.it> wrote:
>
>I have a question regarding the dictionary objects: in a dictionary
>where the values are tuples, is it possible to get the tuple with a
>given key and to change the value of one element of this tuple using
>only one key lookup?

No, because tuples are "immutable" (cannot be changed).  If you want to
do this trick, you'll need to use lists instead (then you can use
standard array notation).
-- 
                      --- Aahz (@netcom.com)

Hugs and backrubs -- I break Rule 6       <*>      http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het

"In the end, outside of spy agencies, people are far too trusting and
willing to help."  -- Ira Winkler




More information about the Python-list mailing list