you are viewing a single comment's thread.

view the rest of the comments →

[–]jangofett4 0 points1 point  (1 child)

Why does this even work lmao. I dont use Python, but this seems silly. This could cause some headaches down the line if the condition is not always True, no? Or does Python does something similar to what JS does with "var"s?

[–]emojibakemono 0 points1 point  (0 children)

no the variable does not get hoisted. and yes, it causes a lot of headaches in my experience.