the class 'Type' needs to have '__slots__ = ()', otherwise every instance of 'Position' will have an unnecessary empty '__dict__' allocated

This commit is contained in:
TheSnoozer 2017-08-09 10:07:40 +02:00 committed by joo
parent 2f0dbf5cbb
commit 64cf23436b

View File

@ -8,6 +8,8 @@ from collections import namedtuple
class Type(object):
__slots__ = ()
@staticmethod
def read(file_object):
raise NotImplementedError("Base data type not serializable")