d13b634fdb72 — Greg Malcolm 13 years ago
From icmurry, github: Added a "THINK ABOUT IT" comment to the section on sending values into generators.
2 files changed, 15 insertions(+), 1 deletions(-)

M python 2/koans/about_generators.py
M python 3/koans/about_generators.py
M python 2/koans/about_generators.py +8 -1
@@ 95,7 95,14 @@ class AboutGenerators(Koan):
     
     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 @@ class AboutGenerators(Koan):
         next(generator2)
         self.assertEqual(__, next(generator2))
 
- 
  No newline at end of file
+ 

          
M python 3/koans/about_generators.py +7 -0
@@ 98,7 98,14 @@ class AboutGenerators(Koan):
     
     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))
                 
     # ------------------------------------------------------------------