Why should I use the __prepare__ method to get a class' namespace?
Note This question is not about the Python 3 Enum data type, it's just the example I'm using. With PEP 3115 Python 3 added the __prepare__ 1 method to type for the purpose of allowing a custom namespace to be used when creating classes. For example, the new Enum data type uses __prepare__ to return an instance of the private _EnumDict for use as the new Enum class' namespace. However, I have seen several examples on SO 2 of EnumMeta being subclassed, creating a new namespace for the class in the metaclass __new__ method, but instead of calling the __prepare__ method to acquire that new