Why am I getting an error message in Python ‘cannot import name NoneType’?
There is no longer a NoneType reference in the types modules. You should just check for identity with None directly, i.e. obj is None. An alternative way, if you really need the NoneType, would be to get it using: NoneType = type(None) This is actually the exact same way types.NoneType was previously defined, before it … Read more