On Thu, Feb 6, 2020 at 10:35 PM Jonathan Fine <[email protected]> wrote: > > I thank Dominik Vilsmeier for noticing > >>> 001 > SyntaxError: invalid token > > This is a problem both the original poster's suggestion: > > >>> P = 100\ > ... 000\ > ... 000 > > and mine: > > >>> t1( 100, 000, 000) > > That '001' is a syntax error interests me. I'll start a new thread for that. >
That's a simple matter of history. Python 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 0100 64 In C and its friends and family, a leading zero means octal. Python 3 removed this (you can use "0o100" for octal, paralleling "0x100" for hex), but in order to ensure that code would cleanly break rather than inexplicably giving the wrong result, "001" is an error. ChrisA _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/C2NU2KS6X62GGTHBEVFJTYEDFEFOGSPC/ Code of Conduct: http://python.org/psf/codeofconduct/
