Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/rhettinger'closed_at=<Date2019-06-11.09:01:44.022>created_at=<Date2019-06-10.22:01:36.483>labels= ['3.8', '3.7', 'library', '3.9']
title='empty set difference does not check types of values'updated_at=<Date2019-06-11.09:01:44.021>user='https://github.com/asottile'
$ python2
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> x =set()
>>> x.difference(123)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'int' object is not iterable
$ python3.8
Python 3.8.0b1 (default, Jun 6 2019, 03:44:52)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> x =set()
>>> x.difference(123)
set()
The regression appears to be introduced in this patch: 4103e4d
New changeset 1f11cf9 by Raymond Hettinger in branch 'master': bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) 1f11cf9
New changeset 583ff84 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) (GH-13967) 583ff84
New changeset 1b615b2 by Raymond Hettinger in branch '3.7':
[3.7] bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) (GH-13968) 1b615b2
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: