[PyQt] Proposal for New-style Signals

Andy Davidoff andy.davidoff at pobox.com
Wed Jan 23 19:00:27 GMT 2008

On Jan 21, 2008 10:20 AM, Phil Thompson <phil at riverbankcomputing.com> wrote:
> Question: An alternative approach would be to define a "default" signal (in
> the .sip files) which would identify the overload to be used with the "short
> form".  As most Qt signals aren't overloaded this would mean that the type
> string would not have to be specified in the majority of cases.  Is this
> worthwhile? (My feeling is yes.)

-1 not pythonic, less legible, could create/hide bugs, later
compatibility issues

Although I don't use an IDE or code completion, I would still prefer a
more explicit type string over an implicit one.  I'd rather the code
was more legible and I believe it could even help the developer catch
type errors earlier, especially when working with someone else's code.

As the "default" would need to be documented and taught, and because
there will be cases where the default may not be used, we will end up
with new code which uses both styles.  This seems confusing for new
developers and again, less legible.

When a new version of Qt/PyQt deprecates or changes the default signal
types, does the semantics of the "default" syntax change in code
written for an earlier version?

If the earlier syntax is supported along with this new syntax, there
are in effect three (or more) ways to write the same expression, of
which a new developer should know at least two.  This may be a
"feature" in perl, but I believe it is generally frowned upon in

Just one opinion, and the rest of your proposal seems like a good step
forward to me.

More information about the PyQt mailing list