From 7626a5b5aa4c3d06b1abb0a72411e65ad9d507db Mon Sep 17 00:00:00 2001 From: Kian Eliasi Date: Sun, 14 Sep 2025 10:14:59 +0330 Subject: [PATCH 1/2] Clarify NameError exception in 'del' --- Doc/reference/simple_stmts.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index 5831bd27cba8d3..7ca6741d15024c 100644 --- a/Doc/reference/simple_stmts.rst +++ b/Doc/reference/simple_stmts.rst @@ -465,8 +465,7 @@ 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 From a05a20fe56e7c9e951124c1068b04157e2508284 Mon Sep 17 00:00:00 2001 From: Kian Eliasi Date: Sun, 14 Sep 2025 13:26:13 +0330 Subject: [PATCH 2/2] Shorten doc lines Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- Doc/reference/simple_stmts.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index 7ca6741d15024c..9c022570e7e847 100644 --- a/Doc/reference/simple_stmts.rst +++ b/Doc/reference/simple_stmts.rst @@ -465,7 +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 namespace, depending on whether the name occurs in a :keyword:`global` statement -in the same code block. Trying to delete an unbound name raises a :exc:`NameError` exception. +in the same code block. Trying to delete an unbound name raises a +:exc:`NameError` exception. .. index:: pair: attribute; deletion