Reports ellipsis literal as syntax error

Bug #1627538 reported by David
6
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 ...:
        print("yes")
    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.

Revision history for this message
asmeurer (asmeurer) wrote :

Again, this does work correctly, but you need to run pyflakes in Python 3, since ellipsis literals are Python 3-only.

Phil Frost (bitglue)
Changed in pyflakes:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.