On 25 November 2014 at 10:47, Guido van Rossum <gu...@python.org> wrote:
> In my defense, the docs for the warnings module on docs.python.org at start
> like this:
>
> "Warning messages are typically issued in situations where it is useful to
> alert the user of some condition in a program, where that condition
> (normally) doesn’t warrant raising an exception and terminating the program.
> For example, one might want to issue a warning when a program uses an
> obsolete module."
>
> I admit that's only a single example, but it does refer to something that
> will break in the future.

The logging tutorial also recommends limiting the use of
warning.warn() to cases where the code triggering the warning can and
should be changed to avoid the warning:
https://docs.python.org/3/howto/logging.html#when-to-use-logging

Vinay explicitly noted it there to contrast with the fact that
logging.warn() is for cases that are dubious and should potentially be
investigated by the application developer, but there's no specific
code change to be made to avoid the warning.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to