From 05aa1eebcf79bb261385d366d86406d7fd2ecf8c Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Thu, 16 Apr 2009 20:26:30 -0400 Subject: [PATCH] fixed spacing in make_counter() example [thanks P.P.] --- iterators-and-generators.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/iterators-and-generators.html b/iterators-and-generators.html index 805d55f..77a4c61 100644 --- a/iterators-and-generators.html +++ b/iterators-and-generators.html @@ -300,22 +300,22 @@ def plural(noun):
 >>> def make_counter(x):
-... print 'entering make_counter'
-... while True:
-...     yield x                    
-...     print 'incrementing x'
-...     x = x + 1
+...     print 'entering make_counter'
+...     while True:
+...         yield x                    
+...         print 'incrementing x'
+...         x = x + 1
 ... 
->>> counter = make_counter(2)      
->>> counter                        
+>>> counter = make_counter(2)          
+>>> counter                            
 <generator object at 0x001C9C10>
->>> next(counter)                  
+>>> next(counter)                      
 entering make_counter
 2
->>> next(counter)                  
+>>> next(counter)                      
 incrementing x
 3
->>> next(counter)                  
+>>> next(counter)                      
 incrementing x
 4