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 authored and joo committed 2017-08-09 16:33:41 +01:00
1 parent 2f0dbf5cbb
commit 64cf23436b
1 file changed
+2
+2
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")