I noticed that in Django models, there is a class Meta
which makes some additional definitions about the model.
My question is, why is this done as an old-style class? (i.e. not subclassing object
?) Is there a reason for this or is this just a custom? Could I do it as a new-style class in my projects?
I believe that there is no real reason (including history, since new-style classes exist since Python 2.2) and that not only can you choose to use a new-style class instead, but that it would probably be a good idea for you to do so (for all the usual reasons).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With