On Fri, 21 May 2021, 17:17 Languedoc, Kevin, <Kevin.Languedoc@ccq.org> wrote:

Hi,

 

In the 3.9.5 documentation in the os module, the setxattr is listed

https://docs.python.org/3/library/os.html#os.setxattr

 

but the os.py source file doesn’t have that function

https://github.com/python/cpython/blob/3.9/Lib/os.py

 

Has this functionality been removed or moved to another module?

 

Thanks

 

Kevin Languedoc 

Data Engineering Specialist

Hi Kevin,

Certain functions in the OS module are implemented in C, and imported in os.py.

See https://github.com/python/cpython/blob/3.9/Lib/os.py#L55 and https://github.com/python/cpython/blob/3.9/Modules/posixmodule.c for example.

Best,
Pradyun