+ 1

What exactly does the 'this' keyword in programming do?

20th Jul 2017, 6:19 PM
Freddie Jensen
Freddie Jensen - avatar
5 Respuestas
+ 3
this keyword refers to current class/object. btw. you tagged python, python has no "this" word, its equivalent is "self".
20th Jul 2017, 6:28 PM
Jakub Stasiak
Jakub Stasiak - avatar
+ 3
"this" refers to the current object you're manipulating.
20th Jul 2017, 6:29 PM
clement
clement - avatar
+ 1
@Jakub Stasiak "self" is only a convention, you can call it "this" if you want.
20th Jul 2017, 6:39 PM
clement
clement - avatar
+ 1
I think I get it now...thanks
20th Jul 2017, 10:42 PM
Freddie Jensen
Freddie Jensen - avatar
0
@clement Yes it is, but you when we speak about keywords there is not such keyword in Python. That is why I pointed it out.
20th Jul 2017, 6:40 PM
Jakub Stasiak
Jakub Stasiak - avatar