[Python-Dev] Retrieve an arbitrary element from a setwithoutremoving it

Terry Reedy tjreedy at udel.edu
Thu Nov 5 02:48:25 CET 2009

Eric Smith wrote:
> Raymond Hettinger wrote:
>> 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.
> Please do!


More information about the Python-Dev mailing list