On Wednesday 26 April 2006 09:03, Talin wrote:

> In my experience dict literals are far more useful than set literals.
> In fact, I don't think I've ever made a set literal. The only
> syntactical short cut that I would find useful for a set would
> be "new empty set", for which I think "set()" is probably short
> enough already. 

I quite often write....

    if state in (case1,case2,case3):

as a shorter form of....

    if state==case1 or state==case2 or state==case3:

That is definitely a set membership test, although there probably is little 
advantage in using a Set object rather than a tuple for this.
-- 
Toby Dickenson
_______________________________________________
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

Reply via email to