tzickel <icebr...@yahoo.com> added the comment:
I would think that the .discard is the equivalent of .pop in dict. (instead of wasting time once checking and once removing, also the data in a set is the data, there is no value to check). Even the standard lib has lots of usage of dict.pop(key, None) to not throw an exception. (instead of not using None, and catching exception). What sets this apart from other mutating APIs is that it does not throw an exception. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35117> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com