Are type hints actually useful?
Discussions on Python.org
Are type hints actually useful?
Hi coders; I have noticed something peculiar about type hints in Python. Though they do provide readers of your code with a clear explanation of what type of object your function/class will give when some input is passed, they don’t really DO much in general. In fact, a simple docstring below the function definition (the def line) can easily describe the type of object your function/class will give when input is passed the same way as a type hint. My Proposal: If type hints are somehow usefu...
Hi coders; I have noticed something peculiar about type hints in Python. Though they do provide readers of your code with a clear explanation of what type of object your…
0 comments
No comments yet.