Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
dugword
· 6y ago · 0 comments
Python already has support for optional braces.
def say_word(word): #{ print(word) #}
Comments
[–]
quietbritishjim
6y ago
Very nice. But with the linked project, although the braces are optional, when you do use them I'm presuming they're checked for correctness (i.e. they match the indentation level and are properly matched).
[–]
wmichelin
6y ago
being technically correct is the best kind of correct.
[–]
smitty1e
6y ago
I had never heard "#" pronounced "optional".
OptionalTheMoreYouKnow
[–]
jojobas
6y ago
Automatically fixes mismatched braces as well!
[–]
makapuf
6y ago
You can also use #begin and #end, of course.
[–]
slowhadoken
6y ago
What??? I had no idea. You’re beautiful.
[–]
wutbrodo
6y ago
In case your not also joking, these are just comments containing braces.
[–]
retrac
6y ago
There are some functions that just aren't readable without heavy commenting.
[–]
slowhadoken
6y ago
Yup joking. I cheer people up with humor. I try to joke while I’m depressed but it just makes Me sound like an ahole.
[–]
polotics
6y ago
Sir (or Madam) you are a genius!