您现在的位置是:课程教程文章
如何查看python文档
2023-12-18 22:03课程教程文章 人已围观
-
Python爬虫+数据分析_腾讯课堂
Python爬虫+数据分析_腾讯课堂... -
python+Django网站新手入门到实战全栈套餐
python+Django网站新手入门到实战全栈套餐... -
Python零基础入门视频VIP体验班【六星教育
Python零基础入门视频VIP体验班【六星教育进班须知: 本课程为Python零基础全栈VIP体验班,包括了预习视频、学习资料代... -
2020最新老男孩Python自动开发Devops开发高级
2020最新老男孩Python自动开发Devops开发高级1.总结归纳D11.mp4 13.pymysql模块D11.mp4 8.where的练习讲解和null的拾遗D11.mp4 6.select语...
调用help函数,可以看到一个函数或者方法的字符串文档。
In [1]: import requests In [2]: help(requests.get) Help on function get in module requests.api: get(url, params=None, **kwargs) Sends a GET request. :param url: URL for the new :class:`Request` object. :param params: (optional) Dictionary or bytes to be sent in the query string for the :class:` Request`. :param \*\*kwargs: Optional arguments that ``request`` takes. :return: :class:`Response <Response>` object :rtype: requests.Response
相关推荐:《Python入门教程》
使用dir可以查看模块或对象都有哪些方法。
In [3]: dir(requests) Out[3]: ['ConnectionError', 'HTTPError', 'compat', 'cookies', 'delete', 'exceptions', 'get', 'head', 'hooks', ...
使用ipython+?查看
In [4]: requests.get? Type: function String form: <function get at 0x10e6c35f0> File: /Library/Python/2.7/site-packages/requests/api.py Definition: requests.get(url, params=None, **kwargs) Docstring: Sends a GET request. :param url: URL for the new :class:`Request` object. :param params: (optional) Dictionary or bytes to be sent in the query string for the :class:`Request`. :param \*\*kwargs: Optional arguments that ``request`` takes. :return: :class:`Response <Response>` object :rtype: requests.Response
使用pydoc查看字符串文档
python -m pydoc requests Help on package requests: NAME requests FILE /Library/Python/2.7/site-packages/requests/__init__.py DESCRIPTION requests HTTP library Requests is an HTTP library, written in Python, for human beings. Basic GET usage: >>> import requests >>> r = requests.get('https://www.python.org') >>> r.status_code 200 >>> 'Python is a programming language' in r.content True课程教程:如何查看python文档
上一篇:python导入模块时报错怎么办
下一篇:没有了