Skip to content

Commit

Permalink
tweaked the tuple lesson for greater clarity (gregmalcolm#167)
Browse files Browse the repository at this point in the history
* tweaked the tuple lesson for greater clarity
  • Loading branch information
danwchan authored and kjc committed Feb 12, 2018
1 parent f4b2b8d commit 602498b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion python2/koans/about_tuples.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def test_tuples_can_only_be_changed_through_replacement(self):
def test_tuples_of_one_look_peculiar(self):
self.assertEqual(__, (1).__class__)
self.assertEqual(__, (1,).__class__)
self.assertEqual(__, ("Hello comma!", ))
self.assertEqual(__, ("I'm a tuple",))
self.assertEqual(__, ("Not a tuple"))

def test_tuple_constructor_can_be_surprising(self):
self.assertEqual(__, tuple("Surprise!"))
Expand Down
3 changes: 2 additions & 1 deletion python3/koans/about_tuples.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def test_tuples_can_only_be_changed_through_replacement(self):
def test_tuples_of_one_look_peculiar(self):
self.assertEqual(__, (1).__class__)
self.assertEqual(__, (1,).__class__)
self.assertEqual(__, ("Hello comma!", ))
self.assertEqual(__, ("I'm a tuple",))
self.assertEqual(__, ("Not a tuple"))

def test_tuple_constructor_can_be_surprising(self):
self.assertEqual(__, tuple("Surprise!"))
Expand Down

0 comments on commit 602498b

Please sign in to comment.