Message231226
set's add() method would be a little bit more useful if it would return True if the added value was already present in the set, and False if it wasn't (or the other way around). Similarly, discard() could report whether the discarded value was present in the set or not.
I suppose this could cost a couple of extra cycles and I'm not sure this is acceptable. For discard() there's always remove() that offers similar behavior. add() does not have an alternative that offers check-and-add behavior. |
|
Date |
User |
Action |
Args |
2014-11-15 22:47:49 | brechtm | set | recipients:
+ brechtm |
2014-11-15 22:47:49 | brechtm | set | messageid: <1416091669.05.0.557383072226.issue22879@psf.upfronthosting.co.za> |
2014-11-15 22:47:48 | brechtm | link | issue22879 messages |
2014-11-15 22:47:48 | brechtm | create | |
|