3 karma · joined Jan 10, 2024 (2y ago) · 4 submissions
comment 2y ago · link · parent
and seriously, what is the mental difference between say (print 'hello') and print('hello'), for me the first is easier. They both have the same number of parenthesis, but in the first I can see all the operations that go together.
Hating python every time I use it. Python is lies all the way down. "You don't need curly braces or anything to mark your code blocks, only indentation"... until you want a multi-line item, in which case you, well, wrap it in parenthesis.
foo = ("a very" "long" "string")
is valid python, and so is foo = ("a very", "long", "string")
but they give different results. vs (cat "a very" "long" "srtring")
comment 2y ago · link · parent
foo = 1 if true else 0
I think this was designed because most of the time foo should equal 1, and they want the code to highlight the default.
I don't like it because reading left to right it takes a few characters to realize it is a branching statement.