On Thu, 14 Jan 2010 18:36:12 +0000 MRAB <pyt...@mrabarnett.plus.com> wrote: > > print ishex('123') is True > > print ishex('abc') is True > > print ishex('xyz') is False > > print ishex('0123456789abcdefABCDEF') is True > > print ishex('0123456789abcdefABCDEFG') is False > > > Don't use 'is', use '=='.
Why? There is only one True and one False in Python. Is it a style issue for you? If so then say "shouldn't" not "don't." -- D'Arcy J.M. Cain <da...@druid.net> | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner. -- http://mail.python.org/mailman/listinfo/python-list