如何找到的源代码斯堪的纳维亚在Python3里?

2024-06-16 13:02:52 发布

您现在位置:Python中文网/ 问答频道 /正文

这和我的another question有点关系。你知道吗

在获取函数源的所有方法中:

  • getsource不起作用
  • 你知道吗斯堪的纳维亚没有__file__属性,所以不能只使用os.scandir.__file__。你知道吗
  • 扫描source file in python github repo没有发现任何有趣的东西。你知道吗

如有任何建议,将不胜感激。你知道吗


Tags: 方法函数ingithubsource属性关系os
1条回答
网友
1楼 · 发布于 2024-06-16 13:02:52

From the documentation

On Unix-based systems, scandir() uses the system’s opendir() and readdir() functions. On Windows, it uses the Win32 FindFirstFileW and FindNextFileW functions.

如果你想知道幕后发生了什么,我建议你看看这些。你知道吗

相关问题 更多 >