[Python-Dev] 2.6 object.__init__ & deling __new__
Dino Viehland
dinov at microsoft.com
Tue Jul 14 22:16:10 CEST 2009
I'm updating IronPython to match CPython's behavior w/ for this issue:
http://bugs.python.org/issue1683368
One thing that I've noticed is that this doesn't seem to be respecting the deletion of attributes (on 2.6.2):
class x(object): pass
x().__init__(2,3,4) # throws - seems right
class x(object):
def __new__(cls, *args):
return object.__new__(cls)
x().__init__(2,3,4) # doesn't throw - seems right
del x.__new__
x().__init__(2,3,4) # doesn't throw - I would expect this to throw.
Is this just a bug in CPython not updating whether __new__ has been defined? Or is there something that makes this behavior expected which I'm just missing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20090714/65cddec3/attachment.htm>
More information about the Python-Dev
mailing list