ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-dev
python-dev
Re: [Python-Dev] Retrieve an arbitrary element from a set withoutremoving it
by Antoine Pitrou other posts by this author
Nov 2 2009 2:22AM messages near this date
Re: [Python-Dev] 2.7/3.2 release schedule | Re: [Python-Dev] Retrieve an arbitrary element from a set withoutremoving it
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.

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev@[...].org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev-ml%40maillist.acti
vestate.com
Thread:
Antoine Pitrou
Antoine Pitrou
Greg Ewing
Cameron Simpson
Nick Coghlan

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved