Optional typecheck

DH no at spam.com
Sat Jan 7 10:40:17 EST 2006


Gregory Petrosyan wrote:
> Hello all! Please enlighten me about optional typecheck:
> 
> 1) Will it be available in Python 2.5?
> 2) Will it support things like
> 
> def f(a: int | float)
> 
> 3) Will it support interface checking like
> 
> def g(a: BookInterface)
> 
> or even mix like
> 
> def k(a: file | BookInterface)
> 
> 4) Will it support things like
> 
> def t(*args: T1 | T2, **kwds: T1 | T3)
> 

No, not til python 3.0, which is years off.
For now you can use:
http://www.ilowe.net/software/typecheck/
Or if you want static type checking with it speed boost instead of
typechecking at runtime, there are lots of other options too.
shedskin, pyrex, scipy.weave, boo



More information about the Python-list mailing list