From: Benjamin Peterson Date: Sun, 7 Jun 2009 22:35:00 +0000 (+0000) Subject: always inherit from an appropiate base class X-Git-Tag: v2.7a1~1011 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dea29d0c11b6f63e382710e26cca3dadd0defb28;p=python always inherit from an appropiate base class --- diff --git a/Parser/asdl.py b/Parser/asdl.py index 4b5676cd2b..164ca6bd0d 100644 --- a/Parser/asdl.py +++ b/Parser/asdl.py @@ -10,14 +10,12 @@ browser. Changes for Python: Add support for module versions """ -#__metaclass__ = type - import os import traceback import spark -class Token: +class Token(object): # spark seems to dispatch in the parser based on a token's # type attribute def __init__(self, type, lineno): @@ -45,7 +43,7 @@ class String(Token): self.value = value self.lineno = lineno -class ASDLSyntaxError: +class ASDLSyntaxError(Exception): def __init__(self, lineno, token=None, msg=None): self.lineno = lineno