2

Example:

def func_1():
    ...

def func_2():
    pass

What exactly is ... for? Is it used like pass?

user2379875
  • 153
  • 6
  • It has no relationship to `pass` at all. Here's the [docs for pass](https://docs.python.org/3/reference/simple_stmts.html?highlight=pass#grammar-token-pass-stmt). And the marked dupe should answer your q on what the `Ellipsis` object is. – alkasm Nov 11 '19 at 20:30
  • It functions almost exactly like `pass` in the example in this question. As per this answer (and the top reply) in the linked duplicate https://stackoverflow.com/a/6189281/9794932 – Rob Bricheno Nov 11 '19 at 20:33
  • I first came across this in this article. http://slott-softwarearchitect.blogspot.com/2017/11/python-type-hinting-generally-easy.html I was wondering why ... was used in the function body as opposed to pass. – user2379875 Nov 11 '19 at 22:01

0 Answers0