Thanks Hugo! Funny, because sometimes PyQt4 and PySide really have the same errors in the snippets. Human beings tend to repeat their errors:-)! I will try to fix the doc and work out how to send you the patch in about a month. Cheers, Aaron
Am 30.07.2012 16:20, schrieb Hugo Parente Lima: > On Saturday, July 21, 2012 07:29:11 PM Aaron Richiger wrote: >> 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, > Wrong guess, the PySide script translates Qt C++ documentation into PySide > documentation, PyQt4 probably have something similar tool, but we will never > know because the tool (if there's one) used to do it in PyQt4 wasn't released. > >> 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. > The examples were translated from C++ code to Python by humans, this explains > the errors. > >> 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. > All code snippets in the documentation can be fixed, they are on PySide git, > inside the doc directory, patches are appreciated. > >> Even better would be to fix every wrong example code in other classes by >> correcting the script. > The script task is just translate a bunch of XML files do the ReST format, > then > apply the documentation changes described in typesystem files for each module. > >> 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! > The Qt team wrote it =], the PySide devs just did some adaptation proportional > to the time we decided to spent into documentation tasks, but thanks anyway =] > >> Aaron >> _______________________________________________ >> PySide mailing list >> [email protected] >> http://lists.qt-project.org/mailman/listinfo/pyside _______________________________________________ PySide mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/pyside
