i am confused with the usage of ==
and is
.
default_netrc = file is None
if file is None:
try:
file = os.path.join(os.environ['HOME'], ".netrc")
except KeyError:
raise IOError("Could not find .netrc: $HOME is not set")
Here is the code snap.
Is this line default_netrc = file is None
is equal default_netrc = file == None
?
when compare with None
, should we use is
or ==
?