[Steven D'Aprano]
Anyway, given the level of opposition to the suggestion, I'm no longer
willing to carry the flag for it. If anyone else -- perhaps the OP --
feels they want to take it any further, be my guest.

[geremy condra]
I've said before that I'd like there to be one, standard way of
doing this. A function call- set.pick() seems reasonably named
to me- is probably the cleanest way to do that. Absent that,
an example in the docs that illustrates the preferred idiom
would be great.

Summarizing my opposition to a new set method:
1) there already are at least two succinct ways to get the same effect
2) those ways work with any container, not just sets
3) set implementations in other languages show that this isn't needed.
4) there is value to keeping the API compact
5) isn't needed for optimization (selecting the same value in a loop makes no 
sense)
6) absence of real-world code examples that would be meaningfully improved

I would be happy to add an example to the docs so that this thread
can finally end.


Raymond
_______________________________________________
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