#!/usr/local/bin/python2 class C(object): __slots__ = ('_a') def __init__(self): self._a = 0 class C2(C): __slots__ = ('s') c = C2() c.a = 1