https://github.com/python/cpython/commit/481588ad4ccd2aff7ca3bac43379da0ce3b1c6d5 commit: 481588ad4ccd2aff7ca3bac43379da0ce3b1c6d5 branch: main author: Kian Eliasi <[email protected]> committer: terryjreedy <[email protected]> date: 2025-09-15T02:11:01-04:00 summary:
gh-138871: Clarify NameError exception in 'del' (#138881) files: M Doc/reference/simple_stmts.rst diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index 5831bd27cba8d3..9c022570e7e847 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]
