在使用python的时候,dir() 经常用于查看对象的方法或者属性等详情,但是,具体是方法还是属性,主要是干嘛的,还是看不到,而通过help() 出来的信息太多,而且一般不是我们想要看到的,这时候就可以通过第三方库 ===> pdir隆重登场了。

注意:install的时候是pdir2import 的则只需要import pdir
(原因:author:About the name. I wanted to call it "pdir", but there's already one with this name on pypi. Mine is better, of course.)

可以通过pip install pdir2 进行安装,且支持Jupyter。

使用起来也是很简单:

1.查看pdir的介绍

pdir ==> 扩展dir的好用的库

2.查看导入的module

pdir ==> 扩展dir的好用的库

3.查看(搜索)具体的方法(或属性)

pdir ==> 扩展dir的好用的库
pdir ==> 扩展dir的好用的库

github详细介绍

相关文章:

  • 2022-01-06
  • 2022-02-09
  • 2022-03-04
  • 2021-10-12
  • 2022-12-23
  • 2022-01-19
猜你喜欢
  • 2021-12-16
  • 2022-01-21
  • 2021-12-16
  • 2021-11-22
  • 2021-09-16
相关资源
相似解决方案