Message 315430 - Python tracker

Message315430

Author steven.daprano
Recipients jackb, steven.daprano
Date 2018-04-18.01:25:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1524014739.39.0.682650639539.issue33304@psf.upfronthosting.co.za>
In-reply-to
Content
This is not a bug, it is intentional.

In Python 2, numbers with a leading zero are interpreted as octal, leading to surprising results:

py> 015
13

In Python 3, we use 0o15 to get octal, and 015 becomes a syntax error.
History
Date User Action Args
2018-04-18 01:25:39steven.dapranosetrecipients: + steven.daprano, jackb
2018-04-18 01:25:39steven.dapranosetmessageid: <1524014739.39.0.682650639539.issue33304@psf.upfronthosting.co.za>
2018-04-18 01:25:39steven.dapranolinkissue33304 messages
2018-04-18 01:25:38steven.dapranocreate