NoneType
just doesn't happen automatically in the global area. It's not a problem.
>>> NoneType = type(None) >>> x = None >>> type(x) == NoneType True >>> isinstance(x, NoneType) True
In any case, it would be unusual to do a type check. Rather, you should check x is None
.
source share