This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Anthony Sottile
Recipients Anthony Sottile, rhettinger
Date 2019-06-10.22:01:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1560204096.52.0.24651391919.issue37219@roundup.psfhosted.org>
In-reply-to
Content
This is a regression from python2.x behaviour:

$ 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: 4103e4dfbce

https://github.com/python/cpython/commit/4103e4dfbce
History
Date User Action Args
2019-06-10 22:01:36Anthony Sottilesetrecipients: + Anthony Sottile, rhettinger
2019-06-10 22:01:36Anthony Sottilesetmessageid: <1560204096.52.0.24651391919.issue37219@roundup.psfhosted.org>
2019-06-10 22:01:36Anthony Sottilelinkissue37219 messages
2019-06-10 22:01:36Anthony Sottilecreate