Skip to content

Commit dd5eebd

Browse files
committed
Added __slots__ to Token class to save some memory
1 parent 90c6c33 commit dd5eebd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sourcemap/objects.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ class Token(object):
1919
Source column number: src_col
2020
Name of the token: name
2121
"""
22+
23+
__slots__ = ['dst_line', 'dst_col', 'src', 'src_line', 'src_col', 'name']
24+
2225
def __init__(self, dst_line=0, dst_col=0, src='', src_line=0, src_col=0, name=None):
2326
self.dst_line = dst_line
2427
self.dst_col = dst_col

0 commit comments

Comments
 (0)