[issue13948] rm needless use of set function

Éric Araujo report at bugs.python.org
Sat Feb 18 02:14:44 CET 2012


Éric Araujo <merwok at netwok.org> added the comment:

Using a set is actually needed: list membership testing does not use hashes (but probably equality), whereas set and dict membership tests does uses hashes.

(I wrote a class with an __hash__ method that prints something when called, and “test() in []” does not print anything, whereas “test() in set()” does.  So test_hash now uses a set again, and I added a comment to clarify why.)

----------
resolution: duplicate -> invalid
superseder: Get rid of doctests in packaging.tests.test_version -> 

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13948>
_______________________________________


More information about the Python-bugs-list mailing list