So are there any disadvantages of having __slots__?  Is pickling
always different when it is defined, or only in the current master?

Aaron Meurer

On Sat, May 5, 2012 at 2:11 PM, [email protected]
<[email protected]> wrote:
>>>
>>> But I imagine if we were to remove all __slots__ definitions in the
>>> core, that things would be much slower.
>>>
>
> It looks like it. __slots lookup is faster than __dict__ lookup in
> CPython and according to the mailing list of cpython it is an
> implementation deficiency.
>
> However it has no effect on pypy (interesting discussion about their
> implementation):
> http://morepypy.blogspot.fr/2010/11/efficiently-implementing-python-objects.html
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/sympy?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to