Static typing (was Re: Java guy interested in Python)

Clark C. Evans cce at clarkevans.com
Fri Mar 9 06:50:41 EST 2001


> So, are there any efforts in the Python community to provide something in
> this area?  I'm thinking of things like type inference, and of something
> like "permissive typing" (compiler/interpreter to programmer: "you don't have
> to tell me the type of a variable or argument, but if you do, I'll use that
> information to help you wherever I can").

I'd be interesting to know to what level of type infrencing
can be done with Python.  In particular, I wonder what the 
ambiguous cases are...

ML also does dynamic type infrencing, dynamically. When you 
type a  variable or define a function on the interactive
interpreter, ML returns with the type of the object.  I'm sure
something like this could be done in a Python interpreter,
perhaps as an option.   Of course, in ML, if a type is
ambiguous, it must be declared -- unlike python.

Clark






More information about the Python-list mailing list