Help understanding the decisions *behind* python?

Tim Rowe digitig at gmail.com
Thu Jul 23 06:28:22 EDT 2009


2009/7/22 Inky 788 <inky788 at gmail.com>:

> Thanks for the reply Hendrik (and Steven (other reply)). Perhaps I'm
> just not sophisticated enough, but I've never wanted to use a list/
> tuple as a dict key. This sounds like obscure usage, and a bit
> contrived as a reason for having *both* lists and tuples.

If you are used to working in a language that doesn't allow it then
you'll probably carry on using the work-arounds that you have always
used. It almost certainly only seems obscure because you're not
considering it when it would be a natural solution. In a language that
builds *very* heavily on the concept of dictionaries it's not obscure
at all!

-- 
Tim Rowe



More information about the Python-list mailing list