On Jul 26, 12:18 am, Ben Finney <[EMAIL PROTECTED]>
wrote:
> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> > IDLE 1.2c1
> > >>> s = '123 456'
> > >>> s.split()
> > ['123', '456']
>
> The str.split method has no bearing on this discussion,
It most certainly does. To make '123 456' into an integer,
you split it and then join it.
>>> z = '123 456'
>>> y = z.split()
>>> x = ''.join(y)
>>> w = int(x)
>>> w
123456
Just wanted to be sure that this must still be done explicitly
and that the language won't do it for me behind my back.
> which is about
> the Python language syntax,
Provided it is confined to the language syntax.
> and numeric literal values in particular.
Fine, as long as int('123 456') continues to be an error.
>
> --
> \ "Pinky, are you pondering what I'm pondering?" "Wuh, I think |
> `\ so, Brain, but burlap chafes me so." -- _Pinky and The Brain_ |
> _o__) |
> Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list