[issue46721] Optimize set.issuperset() for non-set argument

2022-04-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: -Use-after-free by mutating set during set operations resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46721] Optimize set.issuperset() for non-set argument

2022-04-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a69a4a917c436579c2c4112081ea86a70f1f05d3 by Serhiy Storchaka in branch 'main': bpo-46721: Optimize set.issuperset() for non-set arguments (GH-31280) https://github.com/python/cpython/commit/a69a4a917c436579c2c4112081ea86a70f1f05d3

[issue46721] Optimize set.issuperset() for non-set argument

2022-02-11 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46721] Optimize set.issuperset() for non-set argument

2022-02-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +Use-after-free by mutating set during set operations ___ Python tracker ___ ___

[issue46721] Optimize set.issuperset() for non-set argument

2022-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The new code is similar to the code of set.isdisjoint(), so we can share the code if generalize it. -- ___ Python tracker ___

[issue46721] Optimize set.issuperset() for non-set argument

2022-02-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +29440 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31280 ___ Python tracker

[issue46721] Optimize set.issuperset() for non-set argument

2022-02-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : If the argument of set.issuperset() is not a set, it is first converted to a set. It is equivalent to the following code: if not isinstance(other, (set, frozenset)): other = set(other) # The following is equivalent to: # return