---------------------------------------------------------------------------NameError Traceback (most recent call last)
CellIn[2], line 1----> 11 + aNameError: name 'a' is not defined
Warnings
Python’s warning system is a lot more complicated than R’s. The warnings module provides support for many different kinds of focused warnings, like UserWarning, SyntaxWarning, and UnicodeWarning, among others.
To make nicer warnings here, we use warnings.formatwarning to get rid of file names and line numbers: