3 ms·
Didn't Python used to support braces as an alternative to indentation? I remember it being a feature back in the 1.x days, but I can't find it in the old langua
by wiml 2y ago
Didn't Python used to support braces as an alternative to indentation? I remember it being a feature back in the 1.x days, but I can't find it in the old language docs, so I must be thinking of some other language.
- stingraycharles 2y agoI don't think there was. As a matter of fact, there was actually the following easter egg in earlier versions of Python: >>> from __future__ import braces File "<stdin>", line 1 SyntaxError: not a chance
- qrian 2y agoIt's still there! https://github.com/python/cpython/blob/main/Python/future.c#L41 https://github.com/python/cpython/blob/main/Python/future.c#...