"no variable or argument declarations are necessary."

Paul Rubin http
Wed Oct 5 01:10:07 CEST 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