Skip to content

Commit 82c5740

Browse files
committed
Remove subclassing from object
Also: * fixes bug in dump table method. * fixes comment * rearranges comments * makes method static
1 parent f20346f commit 82c5740

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

zxbpp/prepro/id_.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
from .output import CURRENT_FILE
1515

1616

17-
class ID(object):
18-
""" This class represents an identifier. It's stores a string
17+
class ID:
18+
""" This class represents an identifier. It stores a string
1919
(the ID name and value by default).
2020
"""
2121
def __init__(self, id_, args=None, value=None, lineno=None, fname=None):
@@ -41,14 +41,14 @@ def hasArgs(self):
4141
def __str__(self):
4242
return self.name
4343

44-
def __dumptable(self, table):
45-
""" Dumps table on screen
46-
for debugging purposes
44+
@staticmethod
45+
def __dumptable(table):
46+
""" Dumps table on screen for debugging purposes
4747
"""
4848
for x in table.table.keys():
4949
sys.stdout.write("{0}\t<--- {1} {2}".format(x, table[x], type(table[x])))
5050
if isinstance(table[x], ID):
51-
sys.stdout(" {0}".format(table[x].value)),
51+
sys.stdout.write(" {0}".format(table[x].value)),
5252
sys.stdout.write("\n")
5353

5454
def __call__(self, table):

0 commit comments

Comments
 (0)