6 ms·
The day your wish is fullfilled is the day I stop working with Python. I can't stand all those useless braces everywhere, why are they there at all since good p
by alfiopuglisi 2y ago
The day your wish is fullfilled is the day I stop working with Python. I can't stand all those useless braces everywhere, why are they there at all since good practice mandates proper indentation anyway?
I am at the point where I prefer single quotes for strings, instead of double quotes, just because they feel cleaner. And unfortunately pep8 sometimes mandates double quotes for reasons unknown.
- mg74 2y agoNo need for braces. Just add "end" for marking block ending to match the already block starting keyword ":".
- pansa2 2y agoA while ago, when thinking about syntax design for a new language, I considered this combination (`:` and `end`, as opposed to `do` and `end` as used by Lua etc). Are there any languages that use it, or is Python unique in using `:` to begin a block?
- dbrueck 2y agoNim uses it too. IIRC, Python's predecessor (ABC) didn't have the trailing colon but they did some experiments and found it increased readability.
- eviks 2y agoSingle quotes are also easier to type on the default layout, no Shift