John Henry wrote:
>    print pets.keys()
> 
> should print:
> 
> "Cat", "Dog"

If you do:

Py> pets['Cat'] = 2
Py> pets['Dog'] = 3
Py> pets['DOG'] = 4
Py> pets['cat'] += 5
Py> pets.keys()

What should the result be?

"['Cat', 'Dog']" or "['cat', 'DOG']"?


That is to say, if you use a new case in redefining the values of your
case insensitive dictionary, does the key take on the new case, or will
it always and forever be the case originally given to it?

Cheers,
Cliff
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to