[Python-Dev] Retrieve an arbitrary element from a set withoutremoving it
Steven D'Aprano
steve at pearwood.info
Wed Nov 4 12:34:36 CET 2009
On Wed, 4 Nov 2009 11:54:47 am Greg Ewing wrote:
> Steven D'Aprano wrote:
> > I don't know how expensive it is to create a set iterator,
>
> Not expensive enough to justify burdening the set type with
> extra functionality that will be extremely rarely used.
As my previous posts on this topic tried to convey, this isn't primarily
about efficiency, but about discoverability and obviousness.
Anyway, given the level of opposition to the suggestion, I'm no longer
willing to carry the flag for it. If anyone else -- perhaps the OP --
feels they want to take it any further, be my guest.
--
Steven D'Aprano
More information about the Python-Dev
mailing list