资讯

This post explains how to use classes in Python. Including: how to use static and private methods, constructors, and more!
This post explains what a Python module is and how to use it to drastically extend the capabiltiies of your code. Plus: how to make your own!
Learn about Python metaclasses, how to define and use them, and explore examples to understand their functionality with this comprehensive tutorial.
Python classes can make your code more complicated than necessary. So when should you use classes, and when should you use standard functions instead?
If you need an explicit self hint for the class that refers to whatever class is in context, and you’re using Python 3.11 or later, you can import Self from the typing module and use that as a hint.
Take advantage of the high-level async functions in Python’s asyncio library to write more efficient Python applications.