statusbot/ffa9604027820982f700701359f...

56 lines
2.1 KiB
Plaintext

{
"comments": [
{
"unresolved": false,
"key": {
"uuid": "6bf8b445_73783efd",
"filename": "statusbot/bot.py",
"patchSetId": 3
},
"lineNbr": 134,
"author": {
"id": 5263
},
"writtenOn": "2021-11-10T15:37:39Z",
"side": 1,
"message": "I\u0027m unclear on the reason for this over just using config.get(). Is it in order to avoid needing a try/except block for cases when the section doesn\u0027t exist?",
"revId": "ffa9604027820982f700701359f68f151efbc317",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543"
},
{
"unresolved": false,
"key": {
"uuid": "1e8fed97_9d1678e3",
"filename": "statusbot/bot.py",
"patchSetId": 3
},
"lineNbr": 134,
"author": {
"id": 9311
},
"writtenOn": "2021-11-10T17:18:16Z",
"side": 1,
"message": "This is to avoid the current repetition. Would you prefer using try/except?",
"parentUuid": "6bf8b445_73783efd",
"revId": "ffa9604027820982f700701359f68f151efbc317",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543"
},
{
"unresolved": false,
"key": {
"uuid": "c40e8adc_f839ba4f",
"filename": "statusbot/bot.py",
"patchSetId": 3
},
"lineNbr": 134,
"author": {
"id": 5263
},
"writtenOn": "2021-11-10T17:44:12Z",
"side": 1,
"message": "Nah, this is fine, I just wasn\u0027t sure if the point of this function was to guard against a missing section raising configparser.NoSectionError but now that I play with it a bit more I see that a missing option even raises configparser.NoOptionError as well. However the entire function could simply be:\n\n return config.get(section, name, fallback\u003dNone)\n\nThe fallback keyword argument seems to be sufficient to avoid both exceptions. This probably makes the convenience wrapper itself a questionable bit of added complexity.",
"revId": "ffa9604027820982f700701359f68f151efbc317",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543"
}
]
}