python的函数定义和调用

forward declaration http://en.wikipedia.org/wiki/forward_declaration everything has to be defined before you call it this is exactly the same as in c/c++” well no it is isn’t at all really. you can have a forward definition of a function in c but you cannot in python. you can have run-time checking of functions in python but cannot in c. you can have implicit prototypes in c and that is similar. 所以,python只能先定义后调用。

Posted in 未分类

发表评论