bpo-35312: Make lib2to3.pgen2.parse.ParseError round-trip pickle-able. (GH-10710)

This commit is contained in:
Anthony Sottile 2018-11-27 10:39:49 -08:00 committed by Serhiy Storchaka
parent d4f9cf5545
commit c57e6e2e52
3 changed files with 16 additions and 0 deletions

View file

@ -24,6 +24,9 @@ class ParseError(Exception):
self.value = value
self.context = context
def __reduce__(self):
return type(self), (self.msg, self.type, self.value, self.context)
class Parser(object):
"""Parser engine.