what's this instance?

J. Peng jpeng at block.duxieweb.com
Tue Jan 22 04:25:52 EST 2008


Bruno Desthuilliers 写道:
> J. Peng a écrit :
>> def safe_float(object):
>>   try:
>>     retval = float(object)
>>   except (ValueError, TypeError), oops:
>>     retval = str(oops)
>>   return retval
> 
>> The code above works well.
> 
> For which definition of "works well" ?
> 

I got it from Core Python Programming book I bought.You may ask it to
Westley Chun.:)



More information about the Python-list mailing list