On Monday 26 April 2010 08:58:45 Matti Airas wrote:
> Mark,
> 
> I quite like the idea of putting all QtCore "globals" to a separate
> namespace. However, maybe we could clean it up a bit while at it?
> 
> Apparently the PyQt4.QtCore module functions fall to three different
> categories:
> 
> pyqt.* for the Python-specific APIs
> q.* for assorted utility functions in QtGlobal.h in C++
> rest for QTextStream's utility functions
> 
> So, my proposal is we deal with these three categories separately (maybe
> even separate PSEPs?).
> 
> The q.* utility functions could maybe even stay in QtCore module
> namespace? They're probably not interfering with anything and importing
> them in QtCore would be consistent with native Qt's behaviour.
> 
> As for the pyqt.*, for QtCore.pyqtSignal (not even mentioned in the
> QtCore reference O_o) and QtCore.pyqtSlot we already made a decision in
> PSEP 100 to rename them to QtCore.signal and QtCore.slot. Of course,
> nothing prevents us from amending or changing that decision... Would it
> work if all of these would be moved to the Qt module and the pyqt prefix
> would be removed?
> 
> As for the QTextStream's utility functions, IMO they could be moved to a
> module of their own. Maybe PySide.Stream?
> 
> The Compatibility module you suggested could then import all of these in
> the right places.
> 
> This is already off the QtCore cleanup topic but I also really dislike
> the whole C++ -like stream syntax (or at least having it imported to
> Python). I wonder would it be a too big and unnecessary deviation
> providing no functional advantage but maybe we could offer at least an
> alternative method-call syntax, e.g.:
> 
> stream.write(movie.title).write(movie.acquired).write(movie.notes)
> 
> instead of
> 
> stream << movie.title << movie.acquired << movie.notes ?

Or just:

stream.write("%s%s%s" % (movie.title, movie.acquired, movie.notes))

but nowadays we can use:

stream << ("%s%s%s" % (movie.title, movie.acquired, movie.notes))

which is a bit ugly IMO.
 
> 
> Cheers,
> 
> ma.

-- 
Hugo Parente Lima
INdT - Instituto Nokia de Tecnologia

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to