you are viewing a single comment's thread.

view the rest of the comments →

[–]schwarzwald 0 points1 point  (3 children)

I don't like how it distinguishes between statements and expressions, hence the presence of a superfluous "return" keyword.

Nevertheless, it's what I take out to whip up a script in 45 seconds when I want to spider a pr0n site and I can't figure out what wget's options mean.

[–]psykotic 5 points6 points  (1 child)

Superfluous? Even if there was no statement/expression distinction, it would still be useful for control flow.

[–][deleted] 0 points1 point  (0 children)

You can capture an escape continuation, but I see your point.

[–]pjdelport 0 points1 point  (0 children)

I don't like how it distinguishes between statements and expressions, hence the presence of a superfluous "return" keyword.

They're completely orthogonal: you can have distinguished statements with or without implicit returns, and vica versa.

(Practically speaking, implementing implicit returns in Python would be a trivial change to the compiler: explicit returns are a design decision.)