Krystian Cybulski
Krystian Cybulski

Reputation: 11108

In python, how would I create a new type from scratch which has a Meta class in it

I would like to create a new type using type(...). How do I provide the Meta class for this type?

Upvotes: 3

Views: 90

Answers (1)

Silas Ray
Silas Ray

Reputation: 26150

You don't provide it to type as an argument, the metaclass would subclass type itself, so you would call the metaclass' constructor instead.

Upvotes: 4

Related Questions