On May 22, 2006, at 4:24 PM, Collin Winter wrote: > The main use case I'm thinking of is parameterizing mapping types. Say > I wanted a set of Number lists: in Python 2, I'd just convert the > lists to tuples before adding them to the set. However, in Python 3, > converting the lists to tuples will cause any annotations like > set[list[Number]] to reject the candidate set. I'd like to avoid > having annotations like set[tuple & EveryElementIs(Number)]. Also, > before anyone proposes it, I don't think "just remove the offending > annotations" is a viable solution. >
How about tuple[T] then? tuple[T,] can represent a 1-tuple. -Tony _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com