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

(cherry picked from commit 481588ad4c)

Co-authored-by: Kian Eliasi <kian.elbo@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-09-18 13:43:24 +02:00 committed by GitHub
parent ccf4b3e021
commit 54d5235ed3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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