_slotnames(): this is a fairly expensive calculation.  Cache the
outcome as __slotnames__ on the class.  (Like __slots__, it's not safe
to ask for this as an attribute -- you must look for it in the
specific class's __dict__.  But it must be set using attribute
notation, because __dict__ is a read-only proxy.)
1 file changed