Make ELLIPSIS a separate token. This makes it a syntax error to write ". . ." for Ellipsis.

This commit is contained in:
Georg Brandl 2007-03-18 19:01:53 +00:00
parent 428f0641ec
commit dde002899d
9 changed files with 111 additions and 95 deletions

View file

@ -121,6 +121,7 @@ the \'lazy\' dog.\n\
def testEllipsis(self):
x = ...
self.assert_(x is Ellipsis)
self.assertRaises(SyntaxError, eval, ".. .")
class GrammarTests(unittest.TestCase):