14.06.20 23:45, Ivan Pozdeev via Python-Dev пише:
1. The documentation clearly says that it's supported depending on OS flavor -- so if I want to know if I can supply it, I need to rather check `os.name`. Those members are thus redundant.

    If the distinction is finer than os.name then I'd need some other, case-specific check depending on what the distinction is; alternatively, I could check the function's signature in its metadata if the support is reflected in it.

Yes, it is finer than os.name. It can depend on the kernel or libc version (and we do not know which versions are required on every platform), and there are a lot of platforms besides the main three. The user should not be expert in all platforms on which his program potentially can be ran.

The function's signature is the same on all platforms. Just on some platforms only default value can be passed (None for dir_fd) or only specific types of argument is accepted (path-like, but not int).
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/YWYTZRLQK4ZHRFX3G3MJDGN6H4BJQCKN/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to