>> * New method (proposed by Shane Holloway):  s1.isdisjoint(s2).   

    Mike> +1.  Disjointness verification is one of my main uses for set(),
    Mike> and though I don't think that the early-out condition would
    Mike> trigger often in my code, it would increase readability.

I think the readbility argument is marginal at best.  I use sets frequently
and to the greatest extent possible use the builtin operator support because
I find that more readable.  So for me, I'd be going from

    if not s1 & s2:

to

    if s1.isdisjoint(s2):

I'm not sure that's an improvement.

Maybe it's just me, but given two sets I frequently want to operate on
s1-s2, s2-s1 and s1&s2 in different ways.  I wouldn't find a disjoint
operation all that useful.

Skip
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to