Understand self better by building a class in Python yourself

Опубликовано: 10 Февраль 2025
на канале: Python for Everyone
25,613
563

What if Python would not have classes? In this video you learn how to emulate a class by using a dictionary. To support methods, you see that an instance of the class needs to be passed. Once you start to name this parameter 'self', it becomes clear why methods take self as the first parameter.

M Y O N L I N E T R A I N I N G
🎓Like my style of teaching? Try free chapters of my online courses: https://pythonforeveryone.com

#pythonforeveryone #self #python