Karlo Lozovina wrote: > Let's say I have a class with few string properties and few integers, and > a lot of methods defined for that class. > > Now if I have hundreds of thousands (or even more) of instances of that > class - is it more efficient to remove those methods and make them > separate functions, or it doesn't matter? > > Thanks... > You'd do best to define the instance variable names in __slots__, and be sure to inherit from object. The methods don't matter (they all hang off the class anyway). The __slots__ will save you one reference per object for the __dict__.
-- --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list