[Python-3000] sets in P3K?

Andrew Walkingshaw andrew-pydev at lexical.org.uk
Wed May 3 16:14:35 CEST 2006


On Wed, May 03, 2006 at 08:43:45AM -0500, Michael Urman wrote:
> If people are dead set on a set literal, why not look further, to
> atrocities like <1,2>, <1>, <>; @{1,2}, @{1}, @{}; {{1,2}}, {{1}},
> {{}}; etc.? I know there has been resistance to grouped <> before (not
> for sets), but I can't remember why.

(x < y, z > p)  wouldn't be ambiguous, but it'd really freak me out
(and probably syntax highlighters) seeing that in the middle of a block of
source; I'd hallucinate a set which isn't there. At the moment, you don't
have to check the surrounding context to see what < and > mean, which
you would have to if they also had a meaning as group delimiters; I seem
to remember that this would cause parsing problems for the Python
interpreter as well.

Andrew


More information about the Python-3000 mailing list