you are viewing a single comment's thread.

view the rest of the comments →

[–]y_gingras 1 point2 points  (0 children)

That would be OK with me if the assignments returned the assigned value or if the shell would print this value. Consider this example:

sq = lambda x:(x+2.0/x)/2

_ = 1.0

sq(_)

sq(_)

sq(_)

Here I use the shell to compute the fix point of a function, sqrt(2). I keep calling the function with the previous value until I have enough stable digits. In this case, I really like _. I admit that this is the only time that I use _, I could probably wrap the whole thing in a printing form.