In the error message, instead of telling you that you can't concatenate two objects by showing their values (a string and None
in this example), the Python interpreter tells you this by showing the types of the objects that you tried to concatenate. The type of every string is str
while the type of the single None
instance is called NoneType
.
You normally do not need to concern yourself with NoneType
, but in this example it is necessary to know that type(None) == NoneType
.