News for hackers. Stuff that matters.
Re:Customizing class creation in Python by prashnts on Thursday March 30, 2017 @03:45PM (#13998320)
While I agree that _this_ is an extreme demonstration, metaclasses are powerful tool for developing dev-friendly Base classes/APIs in your libraries. Django models, for example, use metaclasses so the fields you define are more expressive while creating instances.
Re:Customizing class creation in Python by paulddraper on Thursday March 30, 2017 @04:09PM (#13998489)
That's okay as long as the magic holds. If it starts to fail, you have to peek behind the curtain, and you lose yourself among the meta.
Re:Customizing class creation in Python by andybak on Thursday March 30, 2017 @09:02PM (#14000430)
Django famously had a "magic removal" refactor before 1.0 as they collectively decided they had gone too far. They've since plotted a more conservative path but the ORM and similar magic was deemed reasonable.

I've found Django's metaclass usage pretty robust over the years. The curtain mostly remains unpeeked behind.