In article <mailman.935.1263499719.28905.python-l...@python.org>, D'Arcy J.M. Cain <da...@druid.net> wrote: > >try: x = isinstance(s, int) and s or int(s, 0) >except ValueError: [handle invalid input]
Why aren't you using the ternary? -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." --Red Adair -- http://mail.python.org/mailman/listinfo/python-list