gh-138871: Clarify NameError exception in 'del' (#138881)
This commit is contained in:
@@ -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
|
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
|
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
|
in the same code block. Trying to delete an unbound name raises a
|
||||||
will be raised.
|
:exc:`NameError` exception.
|
||||||
|
|
||||||
.. index:: pair: attribute; deletion
|
.. index:: pair: attribute; deletion
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user