bject: Re: [IronPython] System.Convert Problem
If you're trying to convert strings to ints in IronPython, the pythonic
way of doing it would be to use the built-in "int":
>>> int("A")
Traceback (most recent call last):
File "", line 1, in ?
ValueError:
("A", 16)
10
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Davy Mitchell
Sent: Friday, March 10, 2006 3:10 PM
To: Discussion of IronPython
Subject: Re: [IronPython] System.Convert Problem
On 3/10/06, Ernst, Nathan <[EMAIL PROTECTED]> wrot
On 3/10/06, Ernst, Nathan <[EMAIL PROTECTED]> wrote:
> This makes perfect sense. "A" cannot be converted to an integer -
> unless you specify a base, e.g. 16 to treat this as a hex digit.
Thanks for the quick response Nathan. It now makes sense to me too :-)
BTW I switched from System.Convert to
This makes perfect sense. "A" cannot be converted to an integer -
unless you specify a base, e.g. 16 to treat this as a hex digit.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Davy Mitchell
Sent: Friday, March 10, 2006 2:46 PM
To: Discussion of IronPyt