gh-138871: Clarify NameError exception in 'del' (#138881)

This commit is contained in:
Kian Eliasi
2025-09-15 09:41:01 +03:30
committed by GitHub
parent 3e06cfcaee
commit 481588ad4c

View File

@@ -465,8 +465,8 @@ Deletion of a target list recursively deletes each target, from left to right.
Deletion of a name removes the binding of that name from the local or global Deletion of a name removes the binding of that name from the local or global
namespace, depending on whether the name occurs in a :keyword:`global` statement namespace, depending on whether the name occurs in a :keyword:`global` statement
in the same code block. If the name is unbound, a :exc:`NameError` exception in the same code block. Trying to delete an unbound name raises a
will be raised. :exc:`NameError` exception.
.. index:: pair: attribute; deletion .. index:: pair: attribute; deletion