Alexey Muranov <alexey.mura...@gmail.com> added the comment:

The issue is the following: i expect overriding a method with itself to not 
change behaviour of the class.  I do not see how my understanding of `__new__` 
or its point could be relevant.

Do we agree that overriding a method with itself should not change behaviour?  
Is there a more correct way to do it than

    def foo(self, *args, **kwarg):
        # possible extensions
        # ...
        super(__class__, self).foo(*args, **kwarg)

(modified accordingly for class and static methods)?

When I do not override `__new__`, I expect Python to use `object`'s `__new__` 
(or at least pretend that it does). Therefore there should be no difference in 
behaviour.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36827>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to