On 11/15/05, Scott David Daniels <Scott.Daniels at acm.org> 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 > Scott.Daniels at Acm.Org 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().
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4