Issue33304
Created on 2018-04-18 01:11 by jackb, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg315429 - (view) | Author: (jackb) | Date: 2018-04-18 01:11 | |
Entering 007 gives a syntax error. Should return 7. 00 correctly returns 0. 007. correctly returns 7.0. |
|||
| msg315430 - (view) | Author: Steven D'Aprano (steven.daprano) * ![]() |
Date: 2018-04-18 01:25 | |
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. |
|||
| msg315432 - (view) | Author: Steven D'Aprano (steven.daprano) * ![]() |
Date: 2018-04-18 01:48 | |
I've opened an issue to improve the error message: #33305 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:59 | admin | set | github: 77485 |
| 2018-04-18 01:48:19 | steven.daprano | set | messages: + msg315432 |
| 2018-04-18 01:25:39 | steven.daprano | set | status: open -> closed nosy:
+ steven.daprano resolution: not a bug |
| 2018-04-18 01:11:07 | jackb | create | |
