[issue35406] calendar.nextmonth and calendar.prevmonth functions doesn't check if the month is valid

Paul Ganssle report at bugs.python.org
Tue Dec 4 10:37:16 EST 2018


Paul Ganssle <p.ganssle at gmail.com> added the comment:

Might it be worth moving `nextmonth` and `prevmonth` to `calendar._nextmonth` and `calendar._prevmonth` to make it more clear that these are private methods?

Due to Hyrum's Law, people will be using them anyway, but it could have a short deprecation period where `calendar.nextmonth` and `calendar.prevmonth` raise DeprecationWarning and then call `calendar._nextmonth` and `calendar._prevmonth`.

----------
nosy: +p-ganssle

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


More information about the Python-bugs-list mailing list