From b3b19eef53ba44c044640688f8dc1ac472d81b5e Mon Sep 17 00:00:00 2001 From: Taylor Hodge Date: Fri, 23 Feb 2024 08:06:11 -0800 Subject: [PATCH] feat: add dict.update til --- python/dict-update-return-values.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 python/dict-update-return-values.md diff --git a/python/dict-update-return-values.md b/python/dict-update-return-values.md new file mode 100644 index 0000000..f305874 --- /dev/null +++ b/python/dict-update-return-values.md @@ -0,0 +1,5 @@ +# Python `dict.update` method returns `None` + +This is obvious in hindsight, but `dict.update` returns `None`, not the dictionary that's been updated in place. + +(This brief update brought to you by my attempting to use `dict.update` in a list comprehension after using JS object literal for too long.)