[PySide] Wrong documentation/example code

Aaron Richiger a.richi at bluewin.ch
Sat Jul 21 19:29:11 CEST 2012


Dear list!

I don't know how the documentation for the classes is written, but I 
guess it's some script to translate Qt's (PyQt4's) documentation into 
PySide documentation, because the the same errors appear in the current 
version of PyQt4's doc. How ever, this script seems to be quite buggy, 
since it does not produce nice or even valid python code. One example is 
the doc for 
QTextStream(http://www.pyside.org/docs/pyside/PySide/QtCore/QTextStream.html) 
as you noticed from another posting. The first two examples are not 
runnable, the first one is incorrect python syntax ("&data", semicolas 
to terminate the lines are not that pythonic;-)), the second one is not 
type compatible. But there are other places where similar bugs appear too.

If you want to fix the examples of QTextStream, you can get some pieces 
of code from my example application posted just a few minutes ago for 
this particular class.

Even better would be to fix every wrong example code in other classes by 
correcting the script.

And the best would be to adapt the doc for python instead of using the 
same as for C++, because in some cases (e.g QTextStream) I'm quite sure 
that there are better solutions for python. But since this would be a 
big amount of work, I save this wish for Christmas:-)!

Finally, thanks to the guy who wrote the doc, most of it is very helpful 
and correct!

Aaron



More information about the PySide mailing list