3 ms·
That's hilarious. Which PEP made 0_0 syntactically okay? I typed it into an AST visualizer (I'm on mobile) and if I'm not mistaken this is equivalent to `
by neoncontrails 5y ago
That's hilarious. Which PEP made
0_0
syntactically okay? I typed it into an AST visualizer (I'm on mobile) and if I'm not mistaken this is equivalent to `0`. But why?
- kuratkull 5y agoUnderscores in Numeric Literals. (PEP 515) https://www.python.org/dev/peps/pep-0515/ https://www.python.org/dev/peps/pep-0515/ Your question about 0_0 is just 00 which is 0. (This is really common in other modern languages. Readable example: 1_000_000 vs 1000000)