Another way to spell __metaclass__, revisited (was Re: why * is not like unquote)
Anders J. Munch
andersjm at dancontrol.dk
Thu Mar 20 11:24:34 EST 2003
"Peter Hansen" <peter at engcorp.com> wrote:
>You have written this definition:
>
> class tmp(cPreviewFrame, *addins):
>
> as though it were a function call, which it is not. It's a
> statement, introduced by the "class" keyword, which happens
> to use parentheses to help with the syntax.
What if the base list did become more like a function call?
The positional parameters would then be the base list, and keyword
arguments could be exploited to provide a nicer spelling for
__metaclass__.
class derived(base, metaclass=interface): ...
- Anders
More information about the Python-list
mailing list