Hello,
El 10/08/2013 18:40, Tim Chase escribió:
Generally, if you are using the "is" operator to compare against
anything other than None, you're doing it wrong. There are exceptions
to this, but it takes knowing the particulars.
Now I have one doubt, I use 'is' to compare basic types in python 3, for
example .-
v = []
if type(v) is list:
print('Is list...')
Because I think it is more clear and faster than .-
type(v) == [].__class__ ... or ... isinstance(v, list)
Is this correct?
Thanks.
--
Xavi
--
http://mail.python.org/mailman/listinfo/python-list