Perl is worse!

Huaiyu Zhu hzhu at users.sourceforge.net
Fri Jul 28 21:20:13 EDT 2000


On Sat, 29 Jul 2000 00:52:33 GMT, Steve Lamb <grey at despair.rpglink.com> wrote:

>>If they already contained numbers (well, strings of digits), and you were
>>certain, then simply:
>
>>	a = int(b)
>
>    As stated, that would work except Python returns a None on a no-match and
>None can't be converted.
>

That's good, because None usually indicates there is nothing (not even a
zero),

if b is None:
   print "Ok, we'll finish here"
   break
else:
   a = int(b)



Huaiyu



More information about the Python-list mailing list