Рет қаралды 23,373
Python's "self" is really just a variable that points to the current instance of our class. Every method you define must accept "self" as its first argument.
Read an article version of this video at pym.dev/what-is-self/
Find more Python screencasts at pym.dev/screencasts/
00:00 A Python class with self in each method
00:28 Do we need that self argument?
01:22 What is self?
02:26 But what does self mean? Could we rename it?
03:10 Recap: self is the first method of every Python class
#python #oop