7 ms·
This sounds similar to Dropbox's PyAnnotate -- Guido van Rossum writes about it here: http://mypy-lang.blogspot.co.uk/2017/11/dropbox-releases-pyannotate-auto.h
by JosephRedfern 9y ago
This sounds similar to Dropbox's PyAnnotate -- Guido van Rossum writes about it here: http://mypy-lang.blogspot.co.uk/2017/11/dropbox-releases-pyannotate-auto.html http://mypy-lang.blogspot.co.uk/2017/11/dropbox-releases-pya...
Would be interesting to see how MonkeyType and PyAnnotate compare.
- sbuccini 9y agoI'd also like to hear more about this -- both the feature set and the development process. It's interesting that two large engineering organizations responsible for some of the most popular applications on the planet spent hundreds of engineering hours building almost the same exact tool at around the exact same time. I'd also like to know how much quicker or better it could have been completed if it had been done out in the open.
- maxxxxx 9y ago"I'd also like to know how much quicker or better it could have been completed if it had been done out in the open. " I assume they scratched their own itch so it was probably faster to do it on their own addressing their specific needs.
- ambivalence 9y agoThe idea to gather types at runtime is as old as PEP 484. The Dropbox and Facebook teams working on Python type checking know each other. We both worked on our implementations independently since we wanted to first test internally whether the idea holds water. For example, I personally thought it wouldn't be as useful in practice as it turned out to be! We knew we're going to open-source each others' implementations, esp. that Instagram's is focusing solely on Python 3 which isn't useful for Dropbox at the moment. It just took a while to get through the process of open sourcing what we had (cleaning up the early implementation with limited documentation, decoupling from internal data stores, etc.). Would it be cheaper if this started out in the open? Probably, but I don't think by quite the margin as you expect.
- Traveler42 9y agoEven though MonkeyType is focused on Python 3, can the .pyi files be used with Python 2?
- ambivalence 9y agoMonkeyType is Python 3-centric, PyAnnotate is Python 2-centric. PyAnnotate couples re-applying the types with the tool, and uses type comments for this. MonkeyType generates .pyi files that you can either use directly or re-apply them to your code as proper type annotations. Other than that, MonkeyType is used on a daily basis internally and solves a bunch of common annoyances of systems like these, like duplicates in unions, applying better types to stuff that was already hand-annotated with Any, etc.