[kupfer] obj.objects: Never use __slots__



commit 77a751e5261bda60e32ab19b2c3695f52b22d52b
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Mon Jan 11 22:14:45 2010 +0100

    obj.objects: Never use __slots__
    
    Using __slots__ limits object compatibility (technical Python stuff),
    while we can't even measure if it saves us any memory. Better avoid
    this "optimization".

 kupfer/obj/objects.py |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
---
diff --git a/kupfer/obj/objects.py b/kupfer/obj/objects.py
index 275d4f7..0c235dc 100644
--- a/kupfer/obj/objects.py
+++ b/kupfer/obj/objects.py
@@ -48,7 +48,6 @@ class FileLeaf (Leaf, TextRepresentation):
 	"""
 	serilizable = True
 	# To save memory with (really) many instances
-	__slots__ = ("name", "object")
 
 	def __init__(self, obj, name=None):
 		"""Construct a FileLeaf
@@ -325,8 +324,6 @@ class CloseAll (Action):
 		return "gtk-close"
 
 class UrlLeaf (Leaf, TextRepresentation):
-	# slots saves memory since we have lots this Leaf
-	__slots__ = ("name", "object")
 	def __init__(self, obj, name):
 		super(UrlLeaf, self).__init__(obj, name)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]