Henk-Jaap Wagenaar <wagenaarhenkj...@gmail.com> added the comment:

Currently,

    Class C(*some_classes): ...

works 'as expected' and is within grammar and language specification whereas

    Class C(x for x in [object]): ...

does not work but does not cause a syntax error. I can see a use case for both 
in dynamic class factories. I was going to do this, but was thwarted by another 
issue (__doc__ cannot be assigned after creation, nor can it be defined as 
anything but a pure string, any work around or reason that is the case? Not 
true for e.g. functions).

I think having one of these within the language specification and not the other 
is odd.

----------
nosy: +Henk-Jaap Wagenaar

_______________________________________
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

Reply via email to