Commits

Volker Birk  committed e07b426

.

  • Participants
  • Parent commits cfe527b

Comments (0)

Files changed (2)

File pypeg2/__init__.py

             if flag:
                 if len(L) > 1 or how_many(thing) > 1:
                     result = t, L
-                elif not L:
+                elif len(L) == 0:
                     return t, None
                 else:
                     result = t, L[0]

File pypeg2/test/test_pyPEG2.py

     def runTest(self):
         parser = pypeg2.Parser()
         r = parser.parse("hello, world", pypeg2.maybe_some(re.compile(r"\d")))
-        self.assertEqual(r, ('hello, world', None))
+        self.assertEqual(r, ('hello, world', []))
 
 class ParseCardinalityTestCase1(ParserTestCase):
     def runTest(self):