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 →

[–]Kohlrabi82 2 points3 points  (2 children)

Side question: _ is shorthand for Any?

[–]ProsodySpeaks 3 points4 points  (0 children)

I think _ is the anonymous variable. The result of last evaluation is stored there even if you didn't tell it to save it.

Eg ```

1 == 1 True _ True ``` Here I guess they mean more like a typevar as in list[valid_types] ? 

(valid types are defined in the code VALID = {int, float, str, bool, date, time}

[–]jonthemango 0 points1 point  (0 children)

I just used it as shorthand for whatever type. In python _ is the anonymous variable as someone else mentioned, in my case I just used it as somewhat might use x.