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.
Created on 2012年02月06日 08:28 by tshepang, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| rm-needless-use-of-set-function.patch | tshepang, 2012年02月06日 08:28 | review | ||
| Messages (4) | |||
|---|---|---|---|
| msg152725 - (view) | Author: Tshepang Lekhonkhobe (tshepang) * | Date: 2012年02月06日 08:28 | |
I assume that the set() function was used to get rid of duplicates from self.versions, but there aren't any and the test would pass even if there were. |
|||
| msg152738 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年02月06日 15:01 | |
Yes, this test method could be a little clearer. I’ll do this. |
|||
| msg153157 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年02月12日 04:01 | |
Done as part of my general test_version cleanup. |
|||
| msg153618 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年02月18日 01:14 | |
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.) |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:26 | admin | set | github: 58156 |
| 2012年02月18日 01:14:43 | eric.araujo | set | resolution: duplicate -> not a bug superseder: Get rid of doctests in packaging.tests.test_version -> messages: + msg153618 |
| 2012年02月12日 04:01:18 | eric.araujo | set | status: open -> closed resolution: duplicate messages: + msg153157 superseder: Get rid of doctests in packaging.tests.test_version stage: resolved |
| 2012年02月06日 15:01:21 | eric.araujo | set | assignee: tarek -> eric.araujo messages: + msg152738 versions: + 3rd party |
| 2012年02月06日 08:28:07 | tshepang | create | |