Use dict.setdefault() instead of try/KeyError pattern
Recently reminded (by ./modunite) of this nicer pattern, I went
looking for more places to apply it.
Change-Id: Ic14399d8d7afc91d4e339f237f543da1b35f41d6
Reviewed-by: Mate Barany <mate.barany@qt.io>
| commit | 49487e6139d5f85fe497480fc152ae55a7befbb5 |
| parent | 04625fb088264beae583c4d770e920f436727931 |
| author | Edward Welbourne <edward.welbourne@qt.io> |
| committer | Edward Welbourne <edward.welbourne@qt.io> |
| commit time | Wed, 15 May 2024 13:47:00 +0200 |