]> granicus.if.org Git - python/commitdiff
Issue 22603: add missing 'self'. Patch by Francisco Fernández Castaño.
authorTerry Jan Reedy <tjreedy@udel.edu>
Fri, 10 Oct 2014 20:00:18 +0000 (16:00 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Fri, 10 Oct 2014 20:00:18 +0000 (16:00 -0400)
Doc/library/contextlib.rst

index 9f174d787b3461d1ad2780e77076c8b70e21f322..b0688db011be02b8b62ded05f6ebd758601f0b95 100644 (file)
@@ -568,10 +568,10 @@ single definition::
             self.name = name
 
         def __enter__(self):
-            logging.info('Entering: {}'.format(name))
+            logging.info('Entering: {}'.format(self.name))
 
         def __exit__(self, exc_type, exc, exc_tb):
-            logging.info('Exiting: {}'.format(name))
+            logging.info('Exiting: {}'.format(self.name))
 
 Instances of this class can be used as both a context manager::