前言:今天在读《流畅的 Python 》时,突然遇到了 map() 函数,我不认识。之前都是直接谷歌的,今天突然怔了一下,为啥不用 __doc__ 查看文档呢?

遂实践之。

print(map.__doc__)

输出:

map(func, *iterables) --> map object

Make an iterator that computes the function using arguments from
each of the iterables.  Stops when the shortest iterable is exhausted.

也可以直接用控制台,我这里用的是 ipython:

Python 使用 __doc__ 查看文档

相关文章:

  • 2022-01-06
  • 2022-12-23
  • 2022-01-18
  • 2022-02-23
  • 2022-12-23
  • 2021-08-23
  • 2021-08-29
  • 2021-11-23
猜你喜欢
  • 2021-11-23
  • 2021-10-10
  • 2021-10-02
  • 2021-12-27
  • 2021-08-06
  • 2021-11-23
  • 2022-12-23
相关资源
相似解决方案