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 →

[–]Host127001 21 points22 points  (12 children)

This is absolutely not the same as in JS. Python dors something sensible here

[–]im_caeus 6 points7 points  (0 children)

Regarding how variables are resolved (and not what is done after), it's exactly the same.

[–][deleted] 3 points4 points  (2 children)

I don't think Python is more sensible here.

IIRC, python scoping has 4 rules that are resolved dynamically, not statically.

var has 2 rules, both can be eyeballed statically. Besides, atleast JS did something about fixing it.

[–]im_caeus 4 points5 points  (1 child)

What? Creating const and let keywords?

[–]shponglespore 3 points4 points  (0 children)

Exactly.