This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients eric.smith, ezio.melotti, gerryc89, mrabarnett, rhettinger
Date 2020-01-07.01:19:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1578359968.52.0.908759303719.issue39240@roundup.psfhosted.org>
In-reply-to
Content
Instead of doing lookups with square brackets, consider using the dict.get() method that returns a default value rather than raising a KeyError for a missing key.

    composer2[input1]  --> composer2.get(input1, 0)
History
Date User Action Args
2020-01-07 01:19:28rhettingersetrecipients: + rhettinger, eric.smith, ezio.melotti, mrabarnett, gerryc89
2020-01-07 01:19:28rhettingersetmessageid: <1578359968.52.0.908759303719.issue39240@roundup.psfhosted.org>
2020-01-07 01:19:28rhettingerlinkissue39240 messages
2020-01-07 01:19:28rhettingercreate