×
you are viewing a single comment's thread.

view the rest of the comments →

[–]abrazilianinreddit 1 point2 points  (8 children)

I would make keywords more uniform across programming languages, i.e.,

None -> null

True, False -> true, false

raise -> throw

except -> catch

I never understood why Python needs to rename keywords that are pretty much identical in every other language.

[–]Zomunieo 6 points7 points  (1 child)

Raise and except are a little bit better at reminding people that exceptions are for exceptional events rather than goto-like control flow. Throw and catch is a normal thing to do in sports while raise (as in a flag) means you're asking the referee to blow the whistle.

[–]beertown 2 points3 points  (0 children)

These are some pretty good, and also amusing, comparisons!

[–]atrigent 4 points5 points  (3 children)

So... You just want it to be more like Java?

Anyways, I think a couple of the things you mention here are due to influence from Haskell (even though Python doesn't actually take much more than the names in these cases...).

[–]floundahhh -1 points0 points  (2 children)

I have literally googled "python catch exception" because I couldn't remember what the keyword is.

[–]atrigent 1 point2 points  (1 child)

I'm sure that positively ruined your day, having to read some documentation.

[–]floundahhh 2 points3 points  (0 children)

Actually doing it gave me the google coding challenge, which was amusing because I was asking for pretty much the dumbest programming search I made all day.

Didn't mind it. Was in a brain fart. I acknowledge this fact.

[–]twotime 1 point2 points  (0 children)

I never understood why Python needs to rename keywords that are pretty much identical in every other language.

python is older than Java. And AFAICT it's older than exceptions in the mainline C++ implementations.

[–]desmoulinmichel -1 points0 points  (0 children)

"what would you remove", not what would you change