summaryrefslogtreecommitdiffstats
path: root/Objects/exceptions.c
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2021-04-16 15:38:55 (GMT)
committerGitHub <noreply@github.com>2021-04-16 15:38:55 (GMT)
commit3b82cae774638ecf2baaee8fe2cac8fedafb2ca7 (patch)
treecd85a508c6cef850cf0b9a8ada7addc6945ca801 /Objects/exceptions.c
parentb136b1aac4b7d07e3120ee59e41c02bc86032162 (diff)
downloadcpython-3b82cae774638ecf2baaee8fe2cac8fedafb2ca7.zip
cpython-3b82cae774638ecf2baaee8fe2cac8fedafb2ca7.tar.gz
cpython-3b82cae774638ecf2baaee8fe2cac8fedafb2ca7.tar.bz2
bpo-38530: Properly extend UnboundLocalError from NameError (GH-25444)
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r--Objects/exceptions.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 9916ce8..4a2fc27 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -1393,7 +1393,8 @@ ComplexExtendsException(PyExc_Exception, NameError,
/*
* UnboundLocalError extends NameError
*/
-SimpleExtendsException(PyExc_NameError, UnboundLocalError,
+
+MiddlingExtendsException(PyExc_NameError, UnboundLocalError, NameError,
"Local name referenced but not bound to a value.");
/*