[Python-ideas] set.add could return True or False

Cameron Simpson cs at zip.com.au
Fri Mar 16 03:19:40 CET 2012

On 15Mar2012 02:26, Matt Joiner <anacrolix at gmail.com> wrote:
| This is an example only.
[... racy stuff ...]

Then please provide a realistic nonracy example.

And also, what's your use case for "Adding an element that is already
present often constitutes an error in my code"? And how is it not
addressed by:

  b.update( (a,) )

Cameron Simpson <cs at zip.com.au> DoD#743

Always code as if the guy who ends up maintaining your code will be a violent
psychopath who knows where you live.
        - Martin Golding, DoD #0236, martin at plaza.ds.adp.com

More information about the Python-ideas mailing list