def METHOD_NAME(self):
    # sanity, you can assign to __doc__
    class x(object): pass
    class y(object):
        __slots__ = '__doc__'
    class z(object):
        __slots__ = '__dict__'
    for t in (x, y, z):
        a = t()
        a.__doc__ = 'Hello World'
        self.assertEqual(a.__doc__, 'Hello World')
    class x(object): __slots__ = []
    def f(a): a.__doc__ = 'abc'
    self.assertRaises(AttributeError, f, x())
    self.assertRaises(AttributeError, f, object())