python 有 C/C++ 之类的头文件吗? [英] Does python have header files like C/C++?

查看:59
本文介绍了python 有 C/C++ 之类的头文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

python 需要像 C/C++ 这样的头文件吗?包含头文件和导入包有什么区别?

Does python require header files like C/C++ ? What are the differences between including header files and importing packages ?

推荐答案

不,Python 没有头文件,也没有类似的.Java 也没有,尽管您暗示它有.

No, Python does not have header files nor similar. Neither does Java, despite your implication that it does.

相反,我们在 Python 中使用文档字符串"来更轻松地查找和使用我们的接口(使用内置的 help() 函数).

Instead, we use "docstrings" in Python to make it easier to find and use our interfaces (with the built-in help() function).

这篇关于python 有 C/C++ 之类的头文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆