Reports ellipsis literal as syntax error
Bug #1627538 reported by
David
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pyflakes |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Ellipsis is a built-in singleton, also having literal form '...'. For example:
def foo(arg):
if arg is ...:
else:
print("no")
Pyflakes is reporting it as invalid syntax. It's minor, but the ellipsis is quite convenient when a singleton is needed and None won't work.
Changed in pyflakes: | |
status: | New → Invalid |
To post a comment you must log in.
Again, this does work correctly, but you need to run pyflakes in Python 3, since ellipsis literals are Python 3-only.