]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-138871: Clarify NameError exception in 'del' (GH-138881) (#138903)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 16 Sep 2025 13:54:37 +0000 (15:54 +0200)
committerGitHub <noreply@github.com>
Tue, 16 Sep 2025 13:54:37 +0000 (16:54 +0300)
Co-authored-by: Kian Eliasi <kian.elbo@gmail.com>
Doc/reference/simple_stmts.rst

index e8cfc8d8403bc9b698933258529a2603e731f050..d674804df8f82efdd43354ee18dd98d735efba1c 100644 (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
 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