The following are the learnings from the tutorial on None:

  • False friends - words look similar but are completely different
  • None and Null are different
  • You cannot create None variable
  • equality operator is different from identity operator
  • There is only ONE None in Python. All variables are pointing to the same None
  • None is an object, constant and a singleton
  • check for None is done via is operator
  • You can use None as a default parameter when using mutable data types such as list and dictionary
  • None appears in the traceback. Follow it to the object that gave the error and see why the object is None when it shouldn’t be
  • None is the return value of a function that do not have a return value. Example print function