Skip to content

Commit 54d5235

Browse files
[3.13] gh-138871: Clarify NameError exception in 'del' (GH-138881) (#138904)
(cherry picked from commit 481588a) Co-authored-by: Kian Eliasi <[email protected]>
1 parent ccf4b3e commit 54d5235

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/reference/simple_stmts.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@ Deletion of a target list recursively deletes each target, from left to right.
463463

464464
Deletion of a name removes the binding of that name from the local or global
465465
namespace, depending on whether the name occurs in a :keyword:`global` statement
466-
in the same code block. If the name is unbound, a :exc:`NameError` exception
467-
will be raised.
466+
in the same code block. Trying to delete an unbound name raises a
467+
:exc:`NameError` exception.
468468

469469
.. index:: pair: attribute; deletion
470470

0 commit comments

Comments
 (0)