NEWBIE: 'print 0108' is syntax error?

Michael Iles mikei at kinitos.com
Wed Oct 29 17:17:57 EST 2003


Please forgive me for posting such an inane question, I just want to
know what's going on here:
 
-----------------------------------------------------------
Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information. 
>>> print 0105
69
>>> print 0106
70
>>> print 0107
71
>>> print 0108
  File "<stdin>", line 1
    print 0108
             ^
SyntaxError: invalid token
>>> print 0109
  File "<stdin>", line 1
    print 0109
             ^
SyntaxError: invalid token
>>> print 0110
72
>>> print 0111
73
-----------------------------------------------------------
 
What's up with octal 108 and octal 109?
 
Mike.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20031029/92c8f71a/attachment.html>


More information about the Python-list mailing list