2011/5/14 Renato Araujo Oliveira Filho <renato.fi...@openbossa.org>:
> With te goal of making PySide more pytonic, today I decided to
> implement a message handle on PySide to raise an exception for all Qt
> warnings.
> In other words, the PySide programmers will have to handle all warnings from 
> Qt.
>
> Currently you only get a message on the terminal(stderr). Then in most
> cases you did not notice the problem.
>
> With this new implementation, you will know when you are using the
> function in a wrong way,
> and this can help you solve some mysterious problems faster.
>
> On other hand, this can be a problem because the current programs,
> which already handle this, could stop working.
>
> For example this code:
>
> QObject().startTimer(-1)
>
> in the current implementation this will run, but you will receive a
> message on your console (stderr) like that:
>
> "QObject::startTimer: QTimer cannot have a negative interval"
>
> But in the proposed implementation this code will raise
> "RuntimeError", and the programmer will need to handle that.
>

Why not use Python Warning. Warnings can be easily turned to
exceptions while developing new code.

Niki
-- 
|  (\_/)  This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
_______________________________________________
PySide mailing list
PySide@lists.pyside.org
http://lists.pyside.org/listinfo/pyside

Reply via email to