[Development] Technical vision for Qt for Python

Kevin Kofler kevin.kofler at chello.at
Tue Aug 20 03:44:27 CEST 2019

Jason H wrote:
> I also have to point out that there was a statement made by Lars to make
> QML [more] strongly typed. I had expected that from the beginning, that
> Python would be the scripting language of QML, not Javascript[0],

I don't see how Python is inherently more strongly typed than JavaScript. 
Python variables are untyped, method calls are duck-typed and hence work 
with any type that happens to implement the called method. The variable 
contents at a specific point in time are typed at runtime, but that is not 
strong typing. Any type mismatches are only caught when you actually run the 
code, just as in JavaScript. And the type of a variable can also change each 
time it is reassigned, just as in JavaScript.

Python now has the typing module which allows you to set type hints, but 
they are not directly part of the language and in particular not enforced by 
default. (You have to actually run some static type checker explicitly to 
validate them.) The module is also provisional, which means that the API is 
subject to change.

        Kevin Kofler

More information about the Development mailing list