From: Kian Eliasi Date: Mon, 15 Sep 2025 06:11:01 +0000 (+0330) Subject: gh-138871: Clarify NameError exception in 'del' (#138881) X-Git-Tag: v3.15.0a1~376 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=481588ad4ccd2aff7ca3bac43379da0ce3b1c6d5;p=thirdparty%2FPython%2Fcpython.git gh-138871: Clarify NameError exception in 'del' (#138881) --- diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index 5831bd27cba8..9c022570e7e8 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