A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-November/093838.html below:

[Python-Dev] Retrieve an arbitrary element from asetwithoutremoving it

[Python-Dev] Retrieve an arbitrary element from asetwithoutremoving it [Python-Dev] Retrieve an arbitrary element from asetwithoutremoving itChris Bergstresser chris at subtlety.com
Fri Nov 6 03:59:24 CET 2009
On Thu, Nov 5, 2009 at 5:02 PM, Raymond Hettinger <python at rcn.com> wrote:
> Forgot to post the code.  It is short, fast, and easy.  It is explicit about
> handing the case with an empty input.  And it is specific about which value
> it returns (always the first iterated value; not an arbitrary one).  There's
> no guessing about what it does.  It gets the job done.

    I'm trying to take this suggestion in the best possible light,
which is that you honestly think I didn't read past Chapter 3 of the
Python Tutorial, and I am therefore in fact unfamiliar with function
definitions.

-- Chris
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