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/093584.html below:

[Python-Dev] Python-Dev Retrieve an arbitrary element from a set?withoutremoving it

[Python-Dev] Python-Dev Retrieve an arbitrary element from a set?withoutremoving it [Python-Dev] Python-Dev Retrieve an arbitrary element from a set?withoutremoving itCameron Simpson cs at zip.com.au
Tue Nov 3 08:30:46 CET 2009
On 02Nov2009 10:21, Antoine Pitrou <solipsis at pitrou.net> wrote:
| Cameron Simpson <cs <at> zip.com.au> writes:
| > 
| > Personally, I'm for the iteration spec in a lot of ways.
| > 
| > Firstly, a .get()/.pick() that always returns the same element feels
| > horrible. Is there anyone here who _likes_ it?
| 
| I do. Since the caller is asking for an arbitrary element, returning the same
| element is legitimate. It's funny how people seem to have a problem with the
| word "arbitrary" :)
| 
| And I'm -1 on any implicit iteration attaching some state to the object. If you
| want to iterate, there's already an obvious way to it.

Good point. Colour me convinced by this.

I suggest the doco is really clear about the word arbitrary:-)
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

I must really get a thinner pencil. I can't manage this one a bit. It writes
all manner of things I don't intend.
        - rheney at csugrad.cs.vt.edu (Bolo Mk XXXIX)
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