gpt4 book ai didi

python - Python 的 dir() 函数代表什么?

转载 作者:IT老高 更新时间:2023-10-28 20:22:32 25 4
gpt4 key购买 nike

我知道 dir() 函数会返回当前作用域中定义的名称或对象中定义的名称。但是为什么叫 dir() 呢?是不是像 LISP 的 CAR 和 CDR 之类的神秘首字母缩写词?

最佳答案

它为您提供范围(对象)中有效名称(属性)的字母列表。这几乎就是英文directory这个词的意思。

关于python - Python 的 dir() 函数代表什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7695982/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com