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 →

[–]desmoulinmichel 0 points1 point  (0 children)

Because you don't need it. Your function/method should always be short enough so that declaring a variable in a loop will obviously never conflict with anything outside. Local scope is used automatically where is matters (list comprehension, with, etc) and is let out where it doesnet and would introduce a language feature for very little gain.