[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Python 3.5 Type Hints
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2015-10-16 18:22:44
Message-ID: A3B52D10-CE83-4DCC-8351-9FB681856751 () riverbankcomputing ! com
[Download RAW message or body]

On 16 Oct 2015, at 7:27 a.m., Florian Bruhin <me@the-compiler.org> wrote:
> 
> Hi,
> 
> Python 3.5 introduced the `typing` module (PEP 484: [1]) for
> gradual/optional type checking.
> 
> There's also the MyPy checker[2] which seems to start getting
> usable to actually run on projects.
> 
> For C modules, it requires stub files - here's an example for
> lxml.etree: [3]
> 
> I think this would be quite useful for PyQt, as most calls to Qt
> functions/methods could be type-checked statically with MyPy instead
> of raising a TypeError at runtime.
> 
> Are there any plans to add such a functionality to sip? If not, I'll
> probably attempt to write something based on the XML output, but I got
> a bit much on my plate right now :)

It's on the TODO list. I'm not sure yet whether it will sit on top of the XML output or replace it.

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic