[Python-Dev] Retrieve an arbitrary element from a setwithoutremoving it

Chris Bergstresser chris at subtlety.com
Thu Nov 5 23:19:32 CET 2009

On Thu, Nov 5, 2009 at 3:21 PM, "Martin v. Löwis" <martin at v.loewis.de> wrote:
> There are two ways
> a) write a library that provides what you want, publish it on PyPI,
>   and report back in a few years of how many users your library has,
>   what they use it for, and why it should become builtin

    This clearly isn't called for in this case.  We're talking about a
single function on a collection.  In this case, importing an
alternative set API (and maintaining the dependency) is more work than
just writing your own workaround.  The purpose of adding a method is
to prevent the need of everyone writing their own workaround.

> b) write a PEP, wait a few years for the language moratorium to be
>   lifted, provide an implementation, and put the PEP for pronouncement.
>   Careful reading of the Moratorium PEP may allow shortening of the
>   wait.

   Clearly, I'll need to write up the PEP.

> In any case, it seems that this specific change will see some
> opposition. So you will need to convince the opposition, one way or
> the other.

   I doubt some of the people on either side are going to be
convinced.  I'd settle for convincing most of the fence-sitters, along
with a few of the loyal opposition.

-- Chris

More information about the Python-Dev mailing list