On 5/19/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 5/19/06, Collin Winter <[EMAIL PROTECTED]> wrote: > > As a quick data point, I showed around your "dict[str, str|int]" > > example to some friends, all of whom have done a decent amount of > > coding in Python. I gave them some background, including that this was > > an example of type parameterization. To quote one fellow, a PhD > > student in CS at Edinburgh: "So, uh, 'dict[str, int|str]' is supposed > > to represent... uh... I give in, what the hell is that supposed to > > denote?" > > Did you first show them list[int] (to get them used to the idea of > parameterized types) and then dict[str, int] (since the int|str union > could be a distractor)?
I showed examples like list[str] and tuple[int, int], but I don't think I included dict[str, int]. On the other hand, my suggestion of dict[key=str, val=int] didn't go over well either; they liked the readability, but objected to the extra typing imposed by "key=" and "val=". > IMO it's more important whether they are able to recall what it's > supposed to mean after you've explained it once or shown them an > example, than that they be able to guess what it means without > introduction. I'll try asking again after a week or so. Collin Winter _______________________________________________ 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
