Type Hinting vs Type Checking and Preconditions
Delaney, Timothy (Tim)
tdelaney at avaya.com
Tue Mar 7 17:10:05 EST 2006
bearophileHUGS at lycos.com wrote:
> You can look at this, its API looks very well thought out to me:
> http://oakwinter.com/code/typecheck/
>
>> Now, on the other hand, if we were to introduce a purely optional
>> type hint to the function prototype, such as follows:
>> def multiplyByTwo(value:int): return value * 2
>
> I don't think Python will have something like this...
It's actually something that has been being considered for Python 3.0
for a long time.
Search for `python optional static typing` for discussions - the first
two links from Google are blog entries by Guido from a year ago (there's
also a third one linked from PEP 3000).
Tim Delaney
More information about the Python-list
mailing list