Add `__slots__` to Animation classes.
@@ -2383,6 +2383,8 @@ class Animation(object):
"""
+ __slots__ = 'frames'
+
def __init__(self, frames):
"""Create an animation directly from a list of frames.
@@ -2480,8 +2482,9 @@ class Animation(object):
class AnimationFrame(object):
- """A single frame of an animation.
- """
+ """A single frame of an animation."""
+
+ __slots__ = 'image', 'duration'
def __init__(self, image, duration):
"""Create an animation frame from an image.
