Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment: I think this issue is not the best way for answering your question, but I will make a try.
The fact that "class C(x for x in [object]): ..." does not cause a syntax error is a bug. This issue fixes it. The fact that corrected "class C((x for x in [object])): ..." doesn't work is expected, because a generator instance is not a class. The equivalence between a decorator expression and explicit calling a decorator function is true only in one direction and only for valid Python syntax. Saying about equivalence of syntactically incorrect Python code doesn't make sense. Yes, an inheritance list can contain keyword arguments. They are passed to a metaclass constructor as well as positional arguments. The syntaxes of the for statement and comprehensions are different. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32012> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com