https://github.com/python/cpython/commit/5ddd72afd8c6b47b0ad5b46e8c2bb305184aed25
commit: 5ddd72afd8c6b47b0ad5b46e8c2bb305184aed25
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: hugovk <[email protected]>
date: 2025-09-16T16:54:37+03:00
summary:

[3.14] gh-138871: Clarify NameError exception in 'del' (GH-138881) (#138903)

Co-authored-by: Kian Eliasi <[email protected]>

files:
M Doc/reference/simple_stmts.rst

diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst
index e8cfc8d8403bc9..d674804df8f82e 100644
--- a/Doc/reference/simple_stmts.rst
+++ b/Doc/reference/simple_stmts.rst
@@ -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
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to