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
{{ message }}
Repository navigation
Maybe recommend using ellipsis as function body in stubs #109
This would be consistent with other uses of ... in stubs:
x = ... # type: int
def f(x: int = ...) -> int: ...
This has the nice property of making stubs look different from most normal Python source code, so it would be less likely that people would mistake the two. The .pyi extension also helps with the ambiguity.
Even if we decide that this is okay, I'm not sure if this needs to be specified in the PEP, as ... and pass are semantically equivalent. This is only a style issue.
I like it. The "pass" statement has always looked odd to me, in stubs. Ellipsis is better, and makes it clear that you're not looking at a normal Python file.
Activity
matthiaskramm commentedon May 18, 2015
I like it. The "pass" statement has always looked odd to me, in stubs. Ellipsis is better, and makes it clear that you're not looking at a normal Python file.
gvanrossum commentedon May 18, 2015