File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -443,17 +443,17 @@ is semantically equivalent to::
443
443
enter = type(manager).__enter__
444
444
exit = type(manager).__exit__
445
445
value = enter(manager)
446
- exception = False
446
+ hit_except = False
447
447
448
448
try:
449
449
target = value # only if `as target` is present in the with statement
450
450
suite
451
451
except:
452
- exception = True
452
+ hit_except = True
453
453
if not exit(manager, *sys.exc_info()):
454
454
raise
455
455
finally:
456
- if not exception :
456
+ if not hit_except :
457
457
exit(manager, None, None, None)
458
458
459
459
With more than one item, the context managers are processed as if multiple
@@ -846,17 +846,17 @@ is semantically equivalent to::
846
846
aexit = type(manager).__aexit__
847
847
aenter = type(manager).__aenter__
848
848
value = await aenter(manager)
849
- exception = False
849
+ hit_except = False
850
850
851
851
try:
852
852
target = value # only if `as target` is present in the with statement
853
853
suite
854
854
except:
855
- exception = True
855
+ hit_except = True
856
856
if not await aexit(manager, *sys.exc_info()):
857
857
raise
858
858
finally:
859
- if not exception :
859
+ if not hit_except :
860
860
await aexit(manager, None, None, None)
861
861
862
862
See also :meth: `__aenter__ ` and :meth: `__aexit__ ` for details.
You can’t perform that action at this time.
0 commit comments