summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-03-01 22:18:50 +0100
committermathieui <mathieui@mathieui.net>2013-03-01 22:18:50 +0100
commit4383a6abfc765c7083949b03319d0f9574fdfab2 (patch)
treece548e0f0b308020c88cdd8d799453194dfa476e /src/windows.py
parente1956533a6e04d7ba2afdbc841b48804a84120b3 (diff)
downloadpoezio-4383a6abfc765c7083949b03319d0f9574fdfab2.tar.gz
poezio-4383a6abfc765c7083949b03319d0f9574fdfab2.tar.bz2
poezio-4383a6abfc765c7083949b03319d0f9574fdfab2.tar.xz
poezio-4383a6abfc765c7083949b03319d0f9574fdfab2.zip
Test to use slots instead of namedtuplesslots_test
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/windows.py b/src/windows.py
index 2d32da30..4c8793d2 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -43,7 +43,14 @@ allowed_color_digits = ('0', '1', '2', '3', '4', '5', '6', '7')
# msg is a reference to the corresponding Message tuple. text_start and text_end are the position
# delimiting the text in this line.
# first is a bool telling if this is the first line of the message.
-Line = collections.namedtuple('Line', 'msg start_pos end_pos')
+
+class Line(object):
+ __slots__ = ('msg', 'start_pos', 'end_pos')
+
+ def __init__(self, msg, start_pos, end_pos):
+ self.msg = msg
+ self.start_pos = start_pos
+ self.end_pos = end_pos
g_lock = RLock()