3 ms·
You can do both. Python allows for external .pyi files, for situations where you can't modify the underlying library (for example: it's written in C). There are
by joshuamorton 6y ago
You can do both. Python allows for external .pyi files, for situations where you can't modify the underlying library (for example: it's written in C). There are tons of them: https://github.com/python/typeshed https://github.com/python/typeshed, but you can still add types to new code inline.
- ativzzz 6y agoYou can, but clearly the people designing this system have weighed the pros and cons and found that there would be more benefits to them to leave the source code unchanged.
- baweaver 6y agoYeah, there was a ton of discussion on this in the Ruby bugtracker and at core meetings. Matz is very sensitive to breaking the language with Ruby 3 and the core team is doing their best to ensure an easy transition.