A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-October/093306.html below:

[Python-Dev] Retrieve an arbitrary element from a set without removing it

[Python-Dev] Retrieve an arbitrary element from a set without removing it [Python-Dev] Retrieve an arbitrary element from a set without removing itJames Y Knight foom at fuhm.net
Sun Oct 25 18:09:11 CET 2009
On Oct 25, 2009, at 2:50 AM, Terry Reedy wrote:

> Alex Martelli wrote:
>> Next(s) would seem good...
>
> That does not work. It has to be next(iter(s)), and that has been  
> tried and eliminated because it is significantly slower.

But who cares about the speed of getting an arbitrary element from a  
set? How can it *possibly* be a problem in a real program?

If you want to optimize python, this operation is certainly not the  
right place to start...

James
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4