[Types-sig] Type checks

Greg Stein gstein@lyra.org
Tue, 28 Dec 1999 14:04:22 -0800 (PST)


On Tue, 28 Dec 1999, Paul Prescod wrote:
> skaller wrote:
> >         I think you have to think very carefully about what
> > constitues an error here: see my posts about errors in python.
> > It is not acceptable to specify that an exception be thrown.
> > That would NOT permit an optimiser to elide checks, except
> > when it could prove they were not needed.
> 
> If people use the static type check system extensively then it would
> OFTEN be able to elide the checks. If you use type declarations as
> aggressively (say) as you would in Java then you should get exactly as
> many type checks. So I am leaning toward throwing an exception.

Python is also very deterministic. "Implementation-defined" really does
not exist.

Dunno Guido's policy or leanings on this matter, but I've been assuming
that it would remain that way. And that CPython would generally be the
reference platform/definition when the language manual is not clear
enough.

Errors in Python raise exceptions. That is how it is defined, and that is
the general style/pattern for the language.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/