>>> class bob: ... def __init__(this): ... this.a = 1 ... >>> b = bob() >>> b.__doc__ = "DOC" >>> print b.__doc__ DOC >>> print b.a 1