A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2009-July/090629.html below:

[Python-Dev] 2.6 object.__init__ & deling __new__

[Python-Dev] 2.6 object.__init__ & deling __new__ [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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4