I'm experienced in Python and now learning cpp to speed up code. After reading a bit this seems to be the cpp equivalent of self. I found a question explaining the difference from a cpp user's point of view but I'd like to know any differences for a python user's point of view.
解决方案
The major difference is that you mostly don't need this in C++, because there is a syntactic distinction between defining a member and referring to it.
Contrast
Python:
class Foo:
def __init__(self):
self._bar = 42
def baz(self):
return self._bar += 1
C++:
class Foo {
int bar = 42;
public:
int baz() { return bar += 1; }
}