# HG changeset patch # User Greg Malcolm # Date 1296952752 18000 # Sat Feb 05 19:39:12 2011 -0500 # Node ID d13b634fdb7229be138c667c4c72c9b61ed16c9c # Parent 302d4501a5f42e36a28a1ce78981f337f047f72e From icmurry, github: Added a "THINK ABOUT IT" comment to the section on sending values into generators. diff --git a/python 2/koans/about_generators.py b/python 2/koans/about_generators.py --- a/python 2/koans/about_generators.py +++ b/python 2/koans/about_generators.py @@ -95,7 +95,14 @@ def test_generators_can_take_coroutines(self): generator = self.generator_with_coroutine() + + # THINK ABOUT IT: + # Why is this line necessary? + # + # Hint: Read the "Specification: Sending Values into Generators" + # section of http://www.python.org/dev/peps/pep-0342/ next(generator) + self.assertEqual(__, generator.send(1 + 2)) # ------------------------------------------------------------------ @@ -116,4 +123,4 @@ next(generator2) self.assertEqual(__, next(generator2)) - \ No newline at end of file + diff --git a/python 3/koans/about_generators.py b/python 3/koans/about_generators.py --- a/python 3/koans/about_generators.py +++ b/python 3/koans/about_generators.py @@ -98,7 +98,14 @@ def test_generators_can_take_coroutines(self): generator = self.generator_with_coroutine() + + # THINK ABOUT IT: + # Why is this line necessary? + # + # Hint: Read the "Specification: Sending Values into Generators" + # section of http://www.python.org/dev/peps/pep-0342/ next(generator) + self.assertEqual(__, generator.send(1 + 2)) # ------------------------------------------------------------------