From f1648f5f3ca7a6c88ea1900a59ad4de838b8f0eb Mon Sep 17 00:00:00 2001 From: Kian Eliasi Date: Mon, 15 Sep 2025 09:41:01 +0330 Subject: [PATCH] gh-138871: Clarify NameError exception in 'del' (GH-138881) (cherry picked from commit 481588ad4ccd2aff7ca3bac43379da0ce3b1c6d5) Co-authored-by: Kian Eliasi --- Doc/reference/simple_stmts.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index 62c14676af92e5..165436eaa327b4 100644 --- a/Doc/reference/simple_stmts.rst +++ b/Doc/reference/simple_stmts.rst @@ -463,8 +463,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 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 -will be raised. +in the same code block. Trying to delete an unbound name raises a +:exc:`NameError` exception. .. index:: pair: attribute; deletion