From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 18 Sep 2025 11:43:24 +0000 (+0200) Subject: [3.13] gh-138871: Clarify NameError exception in 'del' (GH-138881) (#138904) X-Git-Tag: v3.13.8~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=54d5235ed3c44cbc415f3eb8fc4f3b1744de8437;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-138871: Clarify NameError exception in 'del' (GH-138881) (#138904) (cherry picked from commit 481588ad4ccd2aff7ca3bac43379da0ce3b1c6d5) Co-authored-by: Kian Eliasi --- diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index 62c14676af92..165436eaa327 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