Practical numbers: Difference between revisions
→Semantic type comments replaced by compiler type hints
Line 382:
Semantic clarity for the human reader could be improved by restoring the informal – but cleaner, and more informative – type comments which this version deletes from the original version above.
For example, this version replaces an informative type comment:
'''sumOfAnySubset :: [Int] -> Int -> Bool'''
with a noisier, (but, for the human reader, less informative) compiler hint:
'''List[int]) -> Callable[[Any], Any]'''
<lang python>'''Practical numbers'''
|