Skip to content

Commit 79d7493

Browse files
authored
Update ceval_macros.h to comply with Pythons naming scheme
UnboundLocalError uses the term "variable" for something that is called a "name" in python. This can lead to confusion when getting this error.
1 parent baefbb2 commit 79d7493

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/ceval_macros.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,9 @@ GETITEM(PyObject *v, Py_ssize_t i) {
305305
} while (0);
306306

307307
#define UNBOUNDLOCAL_ERROR_MSG \
308-
"cannot access local variable '%s' where it is not associated with a value"
308+
"cannot access local name '%s' where it is not associated with a value"
309309
#define UNBOUNDFREE_ERROR_MSG \
310-
"cannot access free variable '%s' where it is not associated with a value" \
310+
"cannot access free name '%s' where it is not associated with a value" \
311311
" in enclosing scope"
312312
#define NAME_ERROR_MSG "name '%.200s' is not defined"
313313

0 commit comments

Comments
 (0)