[issue39433] curses.setupterm can raise _curses.error

2020-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: curses.error is documented as an exception raised when a curses library function returns an error. No need to repeat this for every curses function. It is very uncommon to document all exceptions that can be raised by a particular function in Python. Becau

[issue39433] curses.setupterm can raise _curses.error

2020-01-23 Thread Julien Palard
New submission from Julien Palard : Currently the curses module can raise some `_curses.error` exception directly inheriting `Exception`. This make it non-trivial for a newcomer to catch (they think they need a `from _curses import error`, or an `except Exception`, but in fact `error` is imp