mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[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:
parent
ccf4b3e021
commit
54d5235ed3
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue