Message383641
Why am I unable to do:
dict = { **sub_dict for sub_dict in super_dict.values() }
which throws: "dict unpacking cannot be used in dict comprehension"
Whereas the equivalent code below doesn't throw any errors?:
dict = {}
for sub_dict in super_dict.values():
dict = { **dict, **sub_dict }
Am I wrong in thinking the first and second block of code should do the same thing behind the scenes? |
|
Date |
User |
Action |
Args |
2020-12-23 11:21:19 | PartlyFluked | set | recipients:
+ PartlyFluked |
2020-12-23 11:21:19 | PartlyFluked | set | messageid: <1608722479.78.0.847759478082.issue42723@roundup.psfhosted.org> |
2020-12-23 11:21:19 | PartlyFluked | link | issue42723 messages |
2020-12-23 11:21:19 | PartlyFluked | create | |
|