On Thu, 09 Jun 2011 17:44:32 +1000, Ben Finney wrote: > Eric Snow <ericsnowcurren...@gmail.com> writes: > >> AttributeError: attribute '__doc__' of 'type' objects is not writable >> >> That is on 3.3. > > Well, that sucks :-( > > Where can we see the discussion of that change before it was > implemented?
It goes back to Python 2.2, when new style classes were first introduced. [steve@sylar ~]$ python2.2 Python 2.2.3 (#1, Aug 12 2010, 01:08:27) [GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class K(object): ... "foo" ... >>> K.__doc__ = 'bar' Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: attribute '__doc__' of 'type' objects is not writable It's an unnecessary restriction, as far as I'm concerned, but an old one. -- Steven -- http://mail.python.org/mailman/listinfo/python-list