From 64cf23436b21161bbbd11ee8c64863609ac02591 Mon Sep 17 00:00:00 2001 From: TheSnoozer Date: Wed, 9 Aug 2017 10:07:40 +0200 Subject: [PATCH] the class 'Type' needs to have '__slots__ = ()', otherwise every instance of 'Position' will have an unnecessary empty '__dict__' allocated --- minecraft/networking/types.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/minecraft/networking/types.py b/minecraft/networking/types.py index 949be9f..7f23a87 100644 --- a/minecraft/networking/types.py +++ b/minecraft/networking/types.py @@ -8,6 +8,8 @@ from collections import namedtuple class Type(object): + __slots__ = () + @staticmethod def read(file_object): raise NotImplementedError("Base data type not serializable")