Python style questions

Fredrik Lundh fredrik at pythonware.com
Fri Mar 16 12:41:56 EST 2001


Cary O'Brien wrote:
> Dick Streefland: <dick_streefland at tasking.com> wrote:
> >c. use string.atoi(s, 16), or for Python >= 2.0, the builtin int(s, 16).
>
> Hmm...
>
> >>> int('abcd',16)
> Traceback (innermost last):
>   File "<stdin>", line 1, in ?
> TypeError: int requires exactly 1 argument; 2 given
> >>>
>
> Is this a 2.0 feature?

that's probably what Dick meant with "Python >= 2.0", don't
you think?

Cheers /F





More information about the Python-list mailing list