Python Metaclasses: Everything is an Object

  Рет қаралды 5,736

Real Python

Real Python

Жыл бұрын

n Python, everything is an object, even the classes that create objects. You used a class to instantiate an object instance, but classes themselves are also instantiated behind the scenes. This mechanism is available to you as a programmer through the concept of metaclasses.
This is an advanced topic and this video is geared toward an intermediate Python or beyond.
This is a portion of the complete course, which you can find here:
realpython.com/courses/python...
The rest of the course covers:
- Real-world Metaclasses
- Metaclass Usage within the Python Standard Library
- Additional resources to continue your learning

Пікірлер: 9
@drz1
@drz1 Жыл бұрын
Very concise and exactly what I needed. THANK YOU!
@pancernymisiek
@pancernymisiek 11 ай бұрын
where is the 2nd video with real world examples?
@VaibhavSharma-zj4gk
@VaibhavSharma-zj4gk Жыл бұрын
Very easy explaination 😍
@rishiraj2548
@rishiraj2548 Жыл бұрын
Thank you
@RupeshBhandari-977
@RupeshBhandari-977 Жыл бұрын
Great ❤😊
@tbazadaykin
@tbazadaykin 3 ай бұрын
(12:26) If we talk about hierarchy in terms of “ancestor”/“descendant”, then at the top there will be an `object`. Therefore, the class `Apple` will be a descendant of the class `Fruit`, which will be a descendant of the class `object`, and all 3 will be instances of class `type`. Moreover - `type` is a descendant of `object` and both are an instance of `type`. `object` has no ancestors. The ancestor for the class is indicated in the attribute `__base__`.
@serychristianrenaud
@serychristianrenaud Жыл бұрын
Thank
@sihonglai9059
@sihonglai9059 8 ай бұрын
great
@blacky7801
@blacky7801 5 ай бұрын
but what is the type of classobj 🤔?
25 nooby Python habits you need to ditch
9:12
mCoding
Рет қаралды 1,7 МЛН
Moving from Flat Files to SQLite in Python
21:06
Real Python
Рет қаралды 1,2 М.
Python Object Oriented Programming (OOP) - For Beginners
53:06
Tech With Tim
Рет қаралды 3,2 МЛН
Modern Python logging
21:32
mCoding
Рет қаралды 142 М.
Python 3.12 is HERE!
12:37
mCoding
Рет қаралды 155 М.
Metaclasses in Python
15:45
mCoding
Рет қаралды 147 М.
Python Decorators in 15 Minutes
15:14
Kite
Рет қаралды 419 М.
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 785 М.