On Apr 26, 2006, at 4:03 AM, Talin wrote: > This means using '=' instead of ':' and allowing key names to be > bare words > instead of quoted strings.
For my money, this is another use case for symbols in Py3K. I very often mistype string keys in dicts, where I think I would mistype symbols less often (Guido's !symbol syntax isn't half-bad), and where upon access would be much nicer too: compare my_dict["the_key"] with my_dict[!the_key]. Only one character saved (for me) but that adds up and you have fewer variants (my_dict['the_key'] or my_dict["the_key"] versus my_dict[!the_key]) -- of course I'm not saying that strings shoudln't be keys in dicts, only that for a lot of the common uses of dicts, symbols are better. Cheers, Kendall Clark _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
