]> granicus.if.org Git - python/commit
_slotnames(): this is a fairly expensive calculation. Cache the
authorGuido van Rossum <guido@python.org>
Mon, 3 Feb 2003 19:46:54 +0000 (19:46 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 3 Feb 2003 19:46:54 +0000 (19:46 +0000)
commit93fe5642175ce5b7771c3b6e32f820b4788604e9
treec3ca8087609373c676c816b548e748b70607b750
parent2de97d398d5a66307228b1269812da94e65e20a3
_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.)
Lib/pickle.py