Metaclasses in Python offer a powerful way to shape how classes are defined, providing developers with the means to enforce coding standards, limit...
For further actions, you may consider blocking this person and/or reporting abuse
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
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
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!
Great article!
Thanks for your appreciation!
Great article, thanks.
Thanks for your appreciation.
Thanks for your article!
Thanks for your appreciation.
Nice lucid explanation. I'll keep this in my back pocket
Thanks for boosting my energy, a lot much content is on the way...