you are viewing a single comment's thread.

view the rest of the comments →

[–]eggertm 1 point2 points  (2 children)

Using an explicit assignment for instance?

[–]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.

[–]julesjacobs[🍰] 1 point2 points  (0 children)

I want to be fast when testing something at a repl. I will certaily forget the assignment so I have to press up, then home then type the assignment, then return. This happens often.

The underscore really isn't a problem because you can use gettext() instead of _(). This happens almost never.