Skip to content

Commit a830a66

Browse files
committed
Add Ship class to TradeDB
1 parent 9ceba7e commit a830a66

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tradedb.py

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import re # Because irregular expressions are dull
1616
import pypyodbc # Because its documentation was better
1717
from queue import Queue # Because we're British.
18+
from collections import namedtuple
1819

1920
######################################################################
2021
# Classes
@@ -156,6 +157,8 @@ def str(self):
156157
def __repr__(self):
157158
return '%s %s' % (self.system.str().upper(), self.station)
158159

160+
class Ship(namedtuple('Ship', [ 'name', 'capacity', 'maxJump', 'maxJumpFull' ])):
161+
pass
159162

160163
class TradeDB(object):
161164
normalizeRe = re.compile(r'[ \t\'\"\.\-_]')

0 commit comments

Comments
 (0)