[Python] Is 'self' in Python different from 'this' in C++ and Java? [closed]

Discussão em 'Python' iniciado por Stack, Dezembro 7, 2024.

  1. Stack

    Stack Membro Participativo

    I asked this question which is likely to be closed but I still would like to know; Is self in Python different from this in C++ and Java?

    When I used it in the way one would use this in Java, it did not work. However some of the comments here, say it is similar to this.

    why didn't self work? Instead of SO closing my question, it would have been better to have answered it

    if node_to_delete.parent.left == self: // FAIL

    Continue reading...

Compartilhe esta Página