Deletion of a name removes the binding of that name from the local or global namespace, depending on whether the name occurs in a global statement in the same code block.
If the name is unbound, a NameError exception will be raised.
If you access an unbound name, an exception NameError will be raised.
Documentation
The del statement doc says:
The last sentence is confusing; it could be better, something like
Linked PRs