Performance of int/long in Python 3
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Tue Mar 26 01:01:41 EDT 2013
On Mon, 25 Mar 2013 20:55:03 -0400, Roy Smith wrote:
> In article <5150e900$0$29998$c3e8da3$5496439d at news.astraweb.com>,
> Steven D'Aprano <steve+comp.lang.python at pearwood.info> wrote:
>
>> Also, speaking as somebody who remembers a time when ints where not
>> automatically promoted to longs (introduced in, Python 2.2, I think?)
>> let me say that having a single unified int type is *fantastic*,
>
> And incredibly useful when solving Project Euler problems :-)
>
> [I remember when strings didn't have methods]
No string methods? You were lucky. When I were a lad, you couldn't even
use "" delimiters for strings.
>>> "b string"
Parsing error: file <stdin>, line 1:
"b string"
^
Unhandled exception: run-time error: syntax error
Python 0.9.1.
--
Steven
More information about the Python-list
mailing list