Message306159
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. |
|
Date |
User |
Action |
Args |
2017-11-13 15:19:35 | cryvate | set | recipients:
+ cryvate, brett.cannon, ncoghlan, benjamin.peterson, serhiy.storchaka, yselivanov |
2017-11-13 15:19:35 | cryvate | set | messageid: <1510586375.65.0.213398074469.issue32012@psf.upfronthosting.co.za> |
2017-11-13 15:19:35 | cryvate | link | issue32012 messages |
2017-11-13 15:19:35 | cryvate | create | |
|