I am using Django which allows people to add extra parameters to a class by using class Meta.
class FooModel(models.Model):
...
class Meta:
...
The only thing I found in Python's documentation was:
class FooMetaClass(type):
...
class FooClass:
__metaclass__ = FooMetaClass
However, I don't think this is the same thing.
Aucun commentaire:
Enregistrer un commentaire