It's good to see a working examples for metaclasses, usually explanations about metaclasses started something with "You don't need to use metaclasses, find other way around".
Cloud Engineer, with 5+ years of industry experience, and currently pursuing a Master's degree in Artificial Intelligence at JKU Linz. Passionate about learning and making contributions❤
Location
Vienna, Austria
Education
Master's degree in Artificial Intelligence, at JKU Linz, Austria
Thanks for appreciating my content, it's my first article on dev.to ever, and this really boosted my energy, and now I am trying my best to share more such content. Thanks
Hi Muhammad,
Thanks for your article, I like it a lot :-)
I think I spotted a mistake: In the very first code example, there is a def __new__() that calls super().__new__(), and then there is a def __call__() that also calls super().__new__(). Is that correct? Shouldn't it call super().__call__()?
Cloud Engineer, with 5+ years of industry experience, and currently pursuing a Master's degree in Artificial Intelligence at JKU Linz. Passionate about learning and making contributions❤
Location
Vienna, Austria
Education
Master's degree in Artificial Intelligence, at JKU Linz, Austria
Great job! It was a pleasure to read. Maybe if you add some explanation for the arguments of the metaclass' methods, even beginners could understand it fully.
Cloud Engineer, with 5+ years of industry experience, and currently pursuing a Master's degree in Artificial Intelligence at JKU Linz. Passionate about learning and making contributions❤
Location
Vienna, Austria
Education
Master's degree in Artificial Intelligence, at JKU Linz, Austria
Cloud Engineer, with 5+ years of industry experience, and currently pursuing a Master's degree in Artificial Intelligence at JKU Linz. Passionate about learning and making contributions❤
Location
Vienna, Austria
Education
Master's degree in Artificial Intelligence, at JKU Linz, Austria
Hi @wlagyorgy, I just added more explanation for methods and their arguments. Kindly check the article now.
For your reference: I have made changes in the Understanding Metaclasses body.
Cloud Engineer, with 5+ years of industry experience, and currently pursuing a Master's degree in Artificial Intelligence at JKU Linz. Passionate about learning and making contributions❤
Location
Vienna, Austria
Education
Master's degree in Artificial Intelligence, at JKU Linz, Austria
Cloud Engineer, with 5+ years of industry experience, and currently pursuing a Master's degree in Artificial Intelligence at JKU Linz. Passionate about learning and making contributions❤
Location
Vienna, Austria
Education
Master's degree in Artificial Intelligence, at JKU Linz, Austria
Cloud Engineer, with 5+ years of industry experience, and currently pursuing a Master's degree in Artificial Intelligence at JKU Linz. Passionate about learning and making contributions❤
Location
Vienna, Austria
Education
Master's degree in Artificial Intelligence, at JKU Linz, Austria
Cloud Engineer, with 5+ years of industry experience, and currently pursuing a Master's degree in Artificial Intelligence at JKU Linz. Passionate about learning and making contributions❤
Location
Vienna, Austria
Education
Master's degree in Artificial Intelligence, at JKU Linz, Austria
It's good to see a working examples for metaclasses, usually explanations about metaclasses started something with "You don't need to use metaclasses, find other way around".
Thanks for appreciating my content, it's my first article on dev.to ever, and this really boosted my energy, and now I am trying my best to share more such content. Thanks
Hi Muhammad,
Thanks for your article, I like it a lot :-)
I think I spotted a mistake: In the very first code example, there is a
def __new__()that callssuper().__new__(), and then there is adef __call__()that also callssuper().__new__(). Is that correct? Shouldn't it callsuper().__call__()?Yes, you're right, I just corrected it. Thanks for your valuable feedback
Great job! It was a pleasure to read. Maybe if you add some explanation for the arguments of the metaclass' methods, even beginners could understand it fully.
Thanks for your positive feedback, let me edit it and add more explanations.
Hi @wlagyorgy, I just added more explanation for methods and their arguments. Kindly check the article now.
For your reference: I have made changes in the Understanding Metaclasses body.
Gorgeous! Thanks!
Nice lucid explanation. I'll keep this in my back pocket
Thanks for boosting my energy, a lot much content is on the way...
Thanks for your article!
Thanks for your appreciation.
Great article, thanks.
Thanks for your appreciation.
Great article!
Thanks for your appreciation!