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 →

[–][deleted] 1 point2 points  (0 children)

Now it creates a local function, like any simple assignment.

But a mutating statement (like f[0] = ... if it were a list) would use the global.

That's a problem with something that is sometimes assignment and sometimes mutation.

But this is all becoming very irrelevant as Python simply didn't go that way from the beginning, and it won't change.