On Saturday 2006-05-20 20:53, Guido van Rossum wrote: > On 5/20/06, Tony Lownds <[EMAIL PROTECTED]> wrote: > > How about just dict[str:int]? > > A bit too clever, although it happens to work syntactically -- it > calls dict.__getitem__(slice(str, int)).
Hmm. Why "too clever"? The symmetry with the syntax for dict literals is nice, and (to me) it's more instantly apparent that the LH type is the key and the RH type the value than with dict[str, int]. Now, Function[(int, int, int): float] isn't so good. ... Then again, Function(int, int, int): float is pretty nice. What was the compelling reason for not allowing bare slice literals, again? :-) -- g _______________________________________________ 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
