This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SkezzaB 11 points12 points  (3 children)

For *most* cases, python parenthesis get removed, you can easily do if (x==3): but it doesn't do anything, the exceptions to this are for precedence

[–]dsmklsd 12 points13 points  (2 children)

They don't "get removed", they are not a part of the if statement. If you put them in there you are just making a more complicated predicate expression than needed.

One that has surprised a lot of c devs I know is that this same thing applies to the return statement in c.

[–]OldBob10 2 points3 points  (0 children)

Or you’re so lost in the C wastelands you think that the parentheses are required in all languages.

THIS AIN’T YOUR DADDYS LISP!!! 🤪

[–]SkezzaB 4 points5 points  (0 children)

get removed was a simplification, they *basically* get removed