Python - Pass self to another class | Protocol Classes and Type Checking | OOP

Ғылым және технология

Learn how to pass self to the constructor of another class and still take advantage of static type checking in Python. We show you how to fix the ImportError: cannot import name from partially initialized module (most likely due to a circular import) by implementing a Protocol Class.
Chapters in this video:
0:00 - Intro and Explanation
00:41 - Overview
01:13 - Create endpoint class
02:27 - Try passing self to constructor
04:17 - ImportError
04:46 - Protocol Class
06:44 - Success
07:02 - Outro
Video related links:
- Mastering Python: www.blueantoinette.com/2023/1...
- Conda Setup Guide: • How to create a virtua...
- SSH into Remote VM with VS Code: • SSH into Remote VM wit...
Please support our effort and purchase the source code of the entire KZread Series:
www.blueantoinette.com/produc...
About us:
- Homepage: www.blueantoinette.com/
- Contact us: www.blueantoinette.com/contac...
- Twitter: / blueantoinette_
- Consulting Hour: www.blueantoinette.com/produc...
Hashtags:
#python #oop #pythonprogramming

Пікірлер: 2

  • @Doggy_Styles_Coding
    @Doggy_Styles_Coding8 ай бұрын

    reaööy good tutorial, keep it up :)

  • @BlueAntoinette

    @BlueAntoinette

    8 ай бұрын

    Thanks!

Келесі