|
|
Subscribe / Log in / New account

A Python static typing update

A Python static typing update

Posted Jun 13, 2018 14:25 UTC (Wed) by jrn (subscriber, #64214)
Parent article: A Python static typing update

https://lwn.net/Articles/690150/ mentioned a few other tools that consume type hints, like pytype and pycharm. Any updates on those?


to post comments

A Python static typing update

Posted Jun 14, 2018 13:01 UTC (Thu) by LtWorf (subscriber, #124958) [Link]

This library that I wrote makes use of annotations as well: https://github.com/ltworf/typedload

I basically use it to load json into NamedTuple, but it's quite flexible I think.

One problem is that the API of the typing module has been changing even over minor versions, so basically that library ended up having quite a lot of code that does if hasattr() or similar.

If they don't settle on an API, making use of annotations is extremely difficult.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds