Skip to content

Conversation

@corona10
Copy link
Member

@corona10 corona10 commented Oct 6, 2019

There was an unnecessary logic with the empty set.
The logic can be represented by blow code in pure python

result = set() # result = PySet_New(NULL);
it = iter(other)
result.intersection_update(other) 
# result will be empty set and iterator is fully consumed.
# so this logic should be removed

https://bugs.python.org/issue38210

@corona10 corona10 added the type-bug An unexpected behavior, bug, or error label Oct 6, 2019
@serhiy-storchaka serhiy-storchaka merged commit c38e725 into python:master Oct 6, 2019
@corona10 corona10 deleted the bpo-38210 branch October 6, 2019 11:44
jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants