Albert van der Horst <alb...@spenarnc.xs4all.nl> writes:

> But I greatly prefer a set
> 
> "
>         for i in {point1,point2,point3}:
>             statements
> "

Agreed, for the reasons you cite. I think this idiom can be expected to
become more common and hopefully displace using a tuple literal or list
literal, as the set literal syntax becomes more reliably available on
arbitrary installed Python versions.

> [Yes I know { } doesn't denote a set. I tried it. I don't know how to
> denote a set ... ]

Try it in Python 3 and be prepared to be pleased
<URL:http://docs.python.org/3.0/whatsnew/3.0.html#new-syntax>.

-- 
 \                   “Too many Indians spoil the golden egg.” —Sir Joh |
  `\                                                   Bjelke-Petersen |
_o__)                                                                  |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to