跳转到主内容
websoft网络软件专家 - 深耕网络技术,打造实用软件!

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只能先定义后调用。

相关文章