Skip to content

Commit c9dc438

Browse files
committed
Merge pull request mattrobenolt#7 from piquadrat/feature/token-slots
Added __slots__ to Token class to save some memory
2 parents 90c6c33 + 895c8ed commit c9dc438

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ python:
33
- "2.6"
44
- "2.7"
55
- "3.3"
6+
- "3.4"
7+
- "3.5"
68
- "pypy"
79
install:
810
- "pip install -e ."

sourcemap/objects.py

+3
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)