On 2009-01-09, Dennis Lee Bieber wrote:
> On Thu, 08 Jan 2009 09:46:26 -0600, Grant Edwards
> declaimed the following in comp.lang.python:
>
>
>> Heathkit Z80 stuff used octal notation too.
>
> Octal worked well for the old 8080 and derivative processors as
> there were only 7 registers and
On 2009-01-08, Bruno Desthuilliers
wrote:
> Grant Edwards a ?crit :
>> On 2009-01-08, Alex van der Spek wrote:
>>
>>> Thanks much, that makes sense!
>>
>> Well, that's the correct explanation.
>>
>> Whether that feature makes sense or not is debatable. Even I'm
>> not old-school enough that
Grant Edwards a écrit :
On 2009-01-08, Alex van der Spek wrote:
Thanks much, that makes sense!
Well, that's the correct explanation.
Whether that feature makes sense or not is debatable. Even I'm
not old-school enough that I ever use octal literals -- and I
used Unix on a PDP-11 for years
Alex van der Spek wrote:
I can't think of anything that could cause this. Similarly, eval('09')
fails, but for string 0x with x<8 it works. I am teaching myself Python
in order to climb the ladder from Algol(1980s)-->Pascal(1990s)--
VisualBasic(2000)-->Python. I am a physicist, have programmed
In article ,
Unknown wrote:
> On 2009-01-08, Alex van der Spek wrote:
> > Thanks much, that makes sense!
> Well, that's the correct explanation.
> Whether that feature makes sense or not is debatable.
The debate is over! In Py 3.0, octal literals changed from 07 to 0o7;
the old format gets an
Thanks much, that makes sense! Alex van der Spek
--
http://mail.python.org/mailman/listinfo/python-list
On 2009-01-08, Alex van der Spek wrote:
> Thanks much, that makes sense!
Well, that's the correct explanation.
Whether that feature makes sense or not is debatable. Even I'm
not old-school enough that I ever use octal literals -- and I
used Unix on a PDP-11 for years (actually had my own PDP-1
On Jan 8, 9:31 am, Alex van der Spek wrote:
> >>> eval('07')
> 7
> >>> eval('08')
>
> Traceback (most recent call last):
> File "", line 1, in
> eval('08')
> File "", line 1
> 08
> ^
> SyntaxError: invalid token
An integer literal with a leading zero is
interpreted as an octal
Hi,
07 is octal. That's way 08 is invalid. Try this:
===> python
>>> print 011
9
>>> print int('011')
11
--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
--
http://mail.python.org/mailman/listinfo/python-list
I am baffled by this:
IDLE 1.2.2 No Subprocess
>>> input()
07
7
>>> input()
08
Traceback (most recent call last):
File "", line 1, in
input()
File "", line 1
08
^
SyntaxError: invalid token
of course, I can work around this using raw_input() but I want to
underst
10 matches
Mail list logo