Skip to content

Simplify dict update example to use literal key instead of unpacking - #31

Open
amul-sharma wants to merge 1 commit into
aneagoie:masterfrom
amul-sharma:fix-dict-merge-example
Open

Simplify dict update example to use literal key instead of unpacking#31
amul-sharma wants to merge 1 commit into
aneagoie:masterfrom
amul-sharma:fix-dict-merge-example

Conversation

@amul-sharma

Copy link
Copy Markdown

Summary

  • Simplifies {**my_dict, **{'cool': True}} to {**my_dict, 'cool': True} in the dict merging example, since unpacking a single-key dict is unnecessary when the key can be written directly.

Test plan

  • N/A (README example only)

The {**my_dict, **{'cool': True}} form is more verbose than needed for
adding a single key — {**my_dict, 'cool': True} does the same thing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant