[Python-ideas] set.add could return True or False
Matt Joiner
anacrolix at gmail.com
Fri Mar 16 13:45:48 CET 2012
More information about the Python-ideas mailing list
Fri Mar 16 13:45:48 CET 2012
- Previous message: [Python-ideas] set.add could return True or False
- Next message: [Python-ideas] set.add could return True or False
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
This, and more so removing duplication, are my reasons for suggesting it. A lot of my code uses assertions to verify assumptions about uniqueness of elements. This requires checking that an element isn't already present before adding it. Doing these checks on sets shared by threads requires locking, which is a high cost when most operations allow "cheating" with the GIL. But this is a minor boon. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120316/84bba477/attachment.html>
- Previous message: [Python-ideas] set.add could return True or False
- Next message: [Python-ideas] set.add could return True or False
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list