On 11/15/05, Scott David Daniels <[EMAIL PROTECTED]> wrote:
> Since I am fiddling with int/long conversions to/from string:
>
> Is the current behavior intentional (or mandatory?):
>
>      v = int('       55555555555555555555555555555555555555555       ')
> works, but:
>      v = int('       55555555555555555555555555555555555555555L      ')
> fails.
>
> --Scott David Daniels
> [EMAIL PROTECTED]

int(s) works where s is a string representing a number. 10L does not
represent a number directly, but is Python syntax for making an
integer constant a long, and not an int. (Consider that both are
representations of mathematical integers, tho in python we only call
one of them an integer by terminology).

So, what you're asking is like if list('[1,2]') returned [1,2]. If you
need this functionality, maybe you need a regex match and expr().
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to