Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f9bd920

Browse files
committed
Issue 22603: add missing 'self'. Patch by Francisco Fernández Castaño.
1 parent 3894b2a commit f9bd920

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/library/contextlib.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,10 +568,10 @@ single definition::
568568
self.name = name
569569

570570
def __enter__(self):
571-
logging.info('Entering: {}'.format(name))
571+
logging.info('Entering: {}'.format(self.name))
572572

573573
def __exit__(self, exc_type, exc, exc_tb):
574-
logging.info('Exiting: {}'.format(name))
574+
logging.info('Exiting: {}'.format(self.name))
575575

576576
Instances of this class can be used as both a context manager::
577577

0 commit comments

Comments
 (0)