Replies: 1 comment 4 replies
-
|
@toptaran This is dict merge syntax, I believe it was added in python 3.9. If you want to rewrite this as python 3.7 then you might wanna change this to merged_trophy_groups: list[dict[str, Any]] = [
x[0].update(x[1])
for x in zip(
trophy_groups_metadata.get("trophyGroups"),
trophy_groups_user_data.get("trophyGroups"),
strict=False,
)
] This also works. Maybe even more clear merged_trophy_groups: list[dict[str, Any]] = []
for meta, user_data in zip(
trophy_groups_metadata.get("trophyGroups"),
trophy_groups_user_data.get("trophyGroups"),
strict=False
):
meta.update(user_data)
merged_trophy_groups.append(meta) |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm trying to backport it for python 3.7 work to add to GOG launcher as plugin, found weird place that I do not really understand.
Can you explain it to me?
psnawp/src/psnawp_api/models/trophies/trophy_group.py
Lines 346 to 354 in dd0359c
Why do you use this weird construction?
Is not it same as?
I thought to backport for python 3.7 it as such, but I'm not sure is it correct.
Beta Was this translation helpful? Give feedback.
All reactions