[issue42439] Use of ternary operator instead of if and else in month calculation function

Steven D'Aprano report at bugs.python.org
Sun Nov 22 15:25:23 EST 2020


Steven D'Aprano <steve+python at pearwood.info> added the comment:

Why do you care what the implementation of the private methods are? Does it make them faster or fix a bug? How is it "convenient" to change the implementation to ternary if?

Without some better justification, this strikes me as just code churn for no benefit, but the risk of breaking things. For example, you changed the result from a tuple to a list.

Will this break anything? I don't know, but it will take time to find out, and with no obvious benefit to the change, spending that time to find out if this is a safe change is effort for no visible benefit.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42439>
_______________________________________


More information about the Python-bugs-list mailing list