what's this instance?

J. Peng jpeng at block.duxieweb.com
Tue Jan 22 02:36:49 EST 2008


def safe_float(object):
  try:
    retval = float(object)
  except (ValueError, TypeError), oops:
    retval = str(oops)
  return retval

x=safe_float([1,2,3,4])
print x


The code above works well.But what's the instance of "oops"? where is it
coming from? I'm totally confused on it.thanks.



More information about the Python-list mailing list