Samuele Kaplun <samuele.kap...@cern.ch> added the comment:

Hi Giampaolo,

shouldn't then the 2nd option I was proposing (i.e. to call warning.warn) the 
best behavior, given your explanation?

[...]
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.

Python programmers issue warnings by calling the warn() function defined in 
this module. (C programmers use PyErr_WarnEx(); see Exception Handling for 
details).
[...]

In this case asyncore might want raise a warning, since the client code of 
asyncore was expected to handle the event.

If the semantic of log_info is to basically alert the developer is there any 
particular benefit in printing directly to stdout rather than raising a warning 
(or simply printing to stderr)?

Ciao!

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11792>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to