This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lpd
Recipients amaury.forgeotdarc, lpd
Date 2008-01-04.17:35:16
SpamBayes Score 0.110124
Marked as misclassified No
Message-id <1199468117.03.0.638975631805.issue1734@psf.upfronthosting.co.za>
In-reply-to
Content
Please reopen this issue as a documentation bug.

The documentation for __new__ in section 3.4.1 says:

__new__() is intended mainly to allow subclasses of immutable types
(like int, str, or tuple) to customize instance creation.

The documentation for metaclasses in 3.4.3 says nothing about __new__
vs. __init__. It says the metaclass will be "called" for class creation,
and it says the metaclass can be any "callable". This would imply the
use of __call__ rather than __new__ or __init__.

I think 3.4.1 should say:

__new__() is intended mainly to allow subclasses of immutable types
(like int, str, or tuple) to customize instance creation. It is also
used for custom metaclasses (q.v.).

I think 3.4.3 should be reviewed in its entirety to replace the
misleading language about "called" and "callable" with language that
explicitly mentions __new__.
History
Date User Action Args
2008-01-04 17:35:17lpdsetspambayes_score: 0.110124 -> 0.110124
recipients: + lpd, amaury.forgeotdarc
2008-01-04 17:35:17lpdsetspambayes_score: 0.110124 -> 0.110124
messageid: <1199468117.03.0.638975631805.issue1734@psf.upfronthosting.co.za>
2008-01-04 17:35:17lpdlinkissue1734 messages
2008-01-04 17:35:16lpdcreate