[issue26829] update docs: when creating classes a new dict is created for the final class object

R. David Murray report at bugs.python.org
Thu Jun 2 19:29:38 EDT 2016


R. David Murray added the comment:

I can't get the rietveld review tool to work from this network, so I'll do this in a comment.  This looks pretty good to me, but in the following:

  +It is important to note that during the creation of the class, a copy of the
  +namespace object is used in the final class object and the original namespace
  +object is discarded. More explicitly, this means that when ``type.__new__`` is
  +called, the object provided as the namespace parameter has its contents copied
  +to a standard Python dictionary.

I think it is more in keeping with the style of the rest of the doc to boil this down as much as possible.  We can drop the "It is important to note that", and just state the issue once, using the "more explicit" version.  I think borrowing your revised language from the type docs would work well here, by adding "which becomes the __dict__ of the class object" to the end of that sentence.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26829>
_______________________________________


More information about the Python-bugs-list mailing list