Free YouTube views likes and subscribers? Easily!
Get Free YouTube Subscribers, Views and Likes

What is self in Python?

Follow
Python Morsels

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 https://pym.dev/whatisself/

Find more Python screencasts at https://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

posted by triarlyviaddyr6