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
Yes, this is known. The problem is that there is no good definition - in PEP
ham[lower:upper]
but
ham[lower + offset : upper + offset]
From the grammar perspective, they are both expression:expression syntax. How do we tell? Assume single identifier is not an expression? On the other hand, function calls are also technically expressions, however
ham[: upper_fn(x) : step_fn(x)].
I guess we can special case single identifier or number cases.
I'm honestly not too worried about this specific case, especially if it's hard to get right. At worst we just close this as something we simply won't fix so we at least have the issue if someone comes looking for a solution.
becomes:
Taken from PEP 8 in it's "pet peeves" section.
The text was updated successfully, but these errors were encountered: