≈ the.bay.news

PEP 851: Add list.discard()

Discussions on Python.org
PEP 851: Add list.discard()
Abstract Add list.discard(x), which removes the first item equal to x if one is present and does nothing otherwise, returning whether an item was removed. It is the non-raising counterpart to list.remove(), as set.discard() is to set.remove(). The full PEP This was previously discussed in Add list.discard() and deque.discard() and python/cpython#160724. I’m curious to hear what people think of this little proposal. 🙂

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.