why the inconsistency?
newsgroups at jhrothjr.com
Wed Sep 24 03:55:25 CEST 2003
"mensanator" <mensanator at aol.com> wrote in message
news:fbf22ff1.0309231704.3f324abf at posting.google.com...
> I just installed Python 2.3 (upgrading from 2.1).
> Version 2.3 is noticably faster and the automatic
> conversion to long integers is very handy:
> >>> print 2**64
> But if I want to know how many digits 2**64 has, I can't
> just do
> >>> print len(2**64)
> Traceback (most recent call last):
> File "<interactive input>", line 1, in ?
> TypeError: len() of unsized object
> So instead, I did this
> >>> print len(`2**64`)
> But the correct answer is 20, not 21. The reason the
> answer is wrong
> >>> print `2**64`
> Why is the "L" there? I thought "L" isn't used anymore?
I believe it's scheduled to vanish in 2.4, but I could
be wrong about that.
More information about the Python-list