(Sorry for top-posting.) My initial gut feeling is that the change would make a lot of sense but since it's badly breaks backwards-compatibility, it's 2.0 material, and there preferably should be a PSEP about it.
On the other hand, we could have some switch (from PySide.__future__ import QtErrorExceptions?) to turn the feature already in the next PySide version for those who want it. In that case, the next version number should be 1.1, to indicate minor new functionality, IMHO. This, together with the idea of using exceptions instead of return values for errors returned by Qt methods, would be pretty cool! ma. ________________________________________ From: [email protected] [[email protected]] on behalf of ext Renato Araujo Oliveira Filho [[email protected]] Sent: Saturday, May 14, 2011 00:29 To: [email protected] Subject: [PySide] Raises a exception on pytho for all Qt warnings 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. Finally my point is, I would like to know what do you think about that. Is this a good improvement? Can we merge this on the mainline or wait for PySide version 2.0? Other option is to create a global function to enable that at your will. BR -- Renato Araujo Oliveira Filho Instituto Nokia de Tecnologia - INdT _______________________________________________ PySide mailing list [email protected] http://lists.pyside.org/listinfo/pyside _______________________________________________ PySide mailing list [email protected] http://lists.pyside.org/listinfo/pyside
