Author mloskot
Recipients benjamin.peterson, cjw296, eric.araujo, georg.brandl, mloskot
Date 2012-06-07.17:16:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Is this report about documenting of the concept of immutable types in Python in general or regarding existing built-in types, like datetime.datetime?

Generally, the concept of immutable type with relation to tp_new is mentioned (sneaked) here:


"A good rule of thumb is that for immutable types, all initialization should take place in tp_new, while for mutable types, most initialization should be deferred to tp_init."


Note that for immutable object types, the initialization
cannot be done by the tp_init() slot: this would provide the Python 
user with a way to change the initialization.  Therefore, immutable
objects typically have an empty tp_init() implementation and do
all their initialization in their tp_new() slot.

IMHO, it deserves a dedicated section/chapter in the docs.
Date User Action Args
2012-06-07 17:16:56mloskotsetrecipients: + mloskot, georg.brandl, cjw296, benjamin.peterson, eric.araujo
2012-06-07 17:16:55mloskotsetmessageid: <>
2012-06-07 17:16:55mloskotlinkissue4442 messages
2012-06-07 17:16:54mloskotcreate