New submission from Horacio Hoyos: Hi, attempt 2.
My system is MacOs Yosemite (10.10.5), I have installed Python 3.6.1 downloaded from the official Python website. I was having issues while testing a custom Set implementation using the _collections_abc base MutableSet and found that my issue was apparently resolved with issue 8743. From the fix, in the attached script I would expect the and operation between my set implementation and a string to fail with a TypeError, given that string is not an instance of Set. However, the error is not raised, i.e. the print statement is executed. >From the discussion on issue 8743, I would expect _collections_abc.py to have >a test for Set instances, but is not the case (for example): def __and__(self, other): if not isinstance(other, Iterable): return NotImplemented return self._from_iterable(value for value in other if value in self) That is, I was expecting a isinstance(other, Set) somewhere there. In my previous post I was told my python installation was broken. However, I checked the collections_abc.py in my windows system and is the same. I am not an expert on the Python build system, but the patch in bug 8743 applies to /Lib/_abcoll.py, but I guess _collections_abc.py is generated somehow. ---------- components: Library (Lib), macOS messages: 292175 nosy: Horacio Hoyos, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Fix for issue 8743 not available in python MacOS 3.6.1 versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30146> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com