"no variable or argument declarations are necessary."

Paul Rubin http
Tue Oct 4 19:10:07 EDT 2005


marduk <usenet at marduk.letterboxes.org> writes:
> def myfunc(MyClass myparam):
>    int spam = 6
>    str eggs
> 
>    # etc
> 
> i.e. typed declarations and type checking.  This would annoy the heck
> out of me. 

It could be like Lisp, which has optional type declarations.  If you
use the type declarations, the compiler can enforce them through
either static analysis or runtime checks, or alternatively to runtime
checks it can generate optimized code that crashes if the data has the
wrong type at runtime.  If you don't use the declarations, you get the
usual dynamically typed data.



More information about the Python-list mailing list