[issue29476] Simplify set_add_entry()

Serhiy Storchaka report at bugs.python.org
Wed Feb 8 04:14:00 EST 2017


Serhiy Storchaka added the comment:

Sets often are used in following pattern:

    def recurse(obj):
        if subobj not in proceeding:
            proceeding.add(obj)
            for subobj in links(obj):
                recurse(subobj)
            proceeding.discard(obj)

In this case items are added and removed in LIFO order. How this change affects this case?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29476>
_______________________________________


More information about the Python-bugs-list mailing list