In article <[email protected]>, D'Arcy J.M. Cain <[email protected]> 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 ([email protected]) <*> 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
