Author Trundle
Recipients Trundle, aronacher, prologic
Date 2009-03-24.20:25:05
SpamBayes Score 2.98086e-07
Marked as misclassified No
Message-id <>
I think the real problem here is `update_one_slot` and not `object_new`. It
is impossible to set "__new__" to a PyCFunction inside Python code, which
may be a feature, but is in fact very irritating.

For example the following snippet:

>>> class Dict(dict): __new__ = object.__new__
>>> Dict.__new__ is object.__new__
>>> Dict()

I would rather expect this behaviour (or at least that Dict.__new__ is not

>>> Dict.__new__ is object.__new__
>>> Dict()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: object.__new__(Dict) is not safe, use dict.__new__()

The attached patch leads to that behaviour, which also fixes the argument
calling autodetection of `object.__new__`.
Date User Action Args
2009-03-24 20:25:12Trundlesetrecipients: + Trundle, aronacher, prologic
2009-03-24 20:25:11Trundlesetmessageid: <>
2009-03-24 20:25:09Trundlelinkissue5322 messages
2009-03-24 20:25:08Trundlecreate