You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you say "two states backward" from ddd = 0, you get ccc = 0 past ddd = 0, but you probably expect to get the function def aaa() past ddd = 0. The reason for the current behavior is that both the function and ccc = 0 end at the same position, and we yield the smaller scope first. For this case, we would prefer to yield the larger scope first.
However, in the desired implementation for #1057, we'd have the following:
aaa(bbb, ccc)
#!1 ^^^^^^^^
#!2 ^^^^
#!3 ^^^
So if you said "two small paints backward" from ccc, today's behavior would give you bbb, ccc, which is probably what you want, but yielding larger scope first would give you aaa(bbb, ccc, which is probably not what you want.
There's something non-obvious here. It almost feels like you want to take into account iteration scope. In the latter example, you're crossing an iteration scope boundary, whereas in the former you're not
If you're on foo, I'd expect "every small paint" to give foo(bar and baz), rather than foo(bar and baz. So in this case, we want the bigger scope for that second scope. But on bar I'd expect to get bar and baz. Again seems to have something to do with iteration scope 🤔. Almost feels like scopes should be associated with an iteration scope, which is kind of a move toward our earlier attempts to handle iteration
The text was updated successfully, but these errors were encountered:
In the following Python code:
When you say
"two states backward"
fromddd = 0
, you getccc = 0
pastddd = 0
, but you probably expect to get the functiondef aaa()
pastddd = 0
. The reason for the current behavior is that both the function andccc = 0
end at the same position, and we yield the smaller scope first. For this case, we would prefer to yield the larger scope first.However, in the desired implementation for #1057, we'd have the following:
So if you said
"two small paints backward"
fromccc
, today's behavior would give youbbb, ccc
, which is probably what you want, but yielding larger scope first would give youaaa(bbb, ccc
, which is probably not what you want.There's something non-obvious here. It almost feels like you want to take into account iteration scope. In the latter example, you're crossing an iteration scope boundary, whereas in the former you're not
Note also that in the following case:
If you're on
foo
, I'd expect"every small paint"
to givefoo(bar
andbaz)
, rather thanfoo(bar
andbaz
. So in this case, we want the bigger scope for that second scope. But onbar
I'd expect to getbar
andbaz
. Again seems to have something to do with iteration scope 🤔. Almost feels like scopes should be associated with an iteration scope, which is kind of a move toward our earlier attempts to handle iterationThe text was updated successfully, but these errors were encountered: