Skip to content

Commit 1fe2431

Browse files
committed
Respond to comment on PR.
1 parent 842cffb commit 1fe2431

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

axelrod/match.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
def is_stochastic(players, noise):
1515
"""Determines if a match is stochastic -- true if there is noise or if any
1616
of the players involved is stochastic."""
17-
return noise or any(Classifiers["stochastic"](p) for p in players)
17+
return noise or any(map(Classifiers["stochastic"], players))
1818

1919

2020
class Match(object):

axelrod/tests/unit/test_classification.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from axelrod.player import Player
1818

1919

20-
class TestTitForTat(Player):
20+
class TitForTatWithEmptyClassifier(Player):
2121
"""
2222
Same name as TitForTat, but with empty classifier.
2323
"""
@@ -65,7 +65,7 @@ def test_key_error_on_uknown_classifier(self):
6565
Classifiers["invalid_key"](axl.TitForTat)
6666

6767
def test_will_lookup_key_in_dict(self):
68-
self.assertEqual(Classifiers["memory_depth"](TestTitForTat), 1)
68+
self.assertEqual(Classifiers["memory_depth"](TitForTatWithEmptyClassifier), 1)
6969

7070
def test_known_classifiers(self):
7171
# A set of dimensions that are known to have been fully applied

0 commit comments

Comments
 (0)