On Jun 5, 10:48 am, Steven D'Aprano wrote:
> Apparently it gives an error. Can anyone explain why this does not work?
>
> # Python 3.2
>
> >>> class MyType(type): # A metaclass...
>
> ... def __repr__(self):
> ... s = super().__repr__()
> ... return s.replace('class',
On Tue, Jun 5, 2012 at 2:48 AM, Steven D'Aprano
wrote:
> I was playing around with metaclasses and I wondered what would happen if
> the metaclass itself had a metaclass. Sort of a metametaclass.
>
> Apparently it gives an error. Can anyone explain why this does not work?
In your example, Meta is
Steven D'Aprano wrote:
> I was playing around with metaclasses and I wondered what would happen if
> the metaclass itself had a metaclass. Sort of a metametaclass.
>
> Apparently it gives an error. Can anyone explain why this does not work?
>
> # Python 3.2
>
>
>
class MyType(type): # A
I was playing around with metaclasses and I wondered what would happen if
the metaclass itself had a metaclass. Sort of a metametaclass.
Apparently it gives an error. Can anyone explain why this does not work?
# Python 3.2
>>> class MyType(type): # A metaclass...
... def __repr__(self):