Checking function calls

Jay Parlar jparlar at cogeco.ca
Tue Mar 7 08:50:36 CET 2006


On Mar 6, 2006, at 8:44 PM, James Stroud wrote:

> Since python is "weakly typed", you will not be able to check what 
> "type" of arguments a function expects. TypeErrors relating to the 
> type of argemtns you pass will be raised inside the function only and 
> not when it is called. I.e. there is no type checking when a function 
> is called, only in its body.
>

I don't mean to take a tangent from the original purpose of the thread, 
but it is generally accepted that Python is STRONGLY, dynamically 
typed. An example of weak dynamic typing would be Perl.

A lot of it of course comes down to one's definitions of strong/weak, 
but general consensus (at least around c.l.p.) is that Python is a 
strongly typed language.

Jay P.




More information about the Python-list mailing list