Perl is worse!
Steffen Ries
steffen.ries at sympatico.ca
Sat Jul 29 08:25:52 EDT 2000
grey at despair.rpglink.com (Steve Lamb) writes:
> On Fri, 28 Jul 2000 19:29:52 -0400, Karl Ulbrich <kulbrich at yahoo.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.
use:
a = int(b or 0)
then.
/steffen
--
steffen.ries at sympatico.ca <> Gravity is a myth -- the Earth sucks!
More information about the Python-list
mailing list