I understand that comparing int and None types is not valid in Python3 (3.6.1) as I see here:
>>> largest = None
>>> number = 5
>>> number > largest
TypeError: '>' not supported between instances of int and NoneType
But inside this script it doesn't give a TypeError.
largest = None
for number in [5, 20, 11]:
if largest is None or number > largest:
largest = number
When I run this script with python3 it runs without a TypeError. Why?