Author ncoghlan
Recipients amaury.forgeotdarc, barry, eikeon, glyph, gvanrossum, jek, ncoghlan, rhettinger, schmir
Date 2008-06-29.12:25:33
SpamBayes Score 0.00451126
Marked as misclassified No
Message-id <1214742344.02.0.868685065207.issue2235@psf.upfronthosting.co.za>
In-reply-to
Content
Attached patch allows classes to explicitly block inheritance of
object.__hash__ by setting the tp_hash slot to Py_None or the __hash__
attribute to None.

This is similar to the approach used in Py3k, but allows __hash__ to be
inherited by default, with classes explicitly disabling it as
appropriate. I'd also suggest forward porting this approach to Py3k as
well, and then possibly look at replacing a copied tp_hash slot with
Py_None when the inherited tp_hash is object.tp_hash, but tp_cmp or
tp_richcompare are different.
History
Date User Action Args
2008-06-29 12:25:44ncoghlansetspambayes_score: 0.00451126 -> 0.00451126
recipients: + ncoghlan, gvanrossum, barry, rhettinger, amaury.forgeotdarc, schmir, jek, eikeon, glyph
2008-06-29 12:25:44ncoghlansetspambayes_score: 0.00451126 -> 0.00451126
messageid: <1214742344.02.0.868685065207.issue2235@psf.upfronthosting.co.za>
2008-06-29 12:25:39ncoghlanlinkissue2235 messages
2008-06-29 12:25:38ncoghlancreate