This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka
Date 2019-10-05.15:04:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1570287843.24.0.0727618245068.issue38378@roundup.psfhosted.org>
In-reply-to
Content
os.sendfile() has a keyword-or-positional parameter named "in". Since it is a keyword in Python, it is not possible to pass it as a keyword argument. You can only pass it as a positional argument or using a var-keyword argument (unlikely anybody uses the latter). The preceding parameter, "out", also can not be passed by keyword because of this.

It is weird, but usually does not cause a problem. You cannot use a keyword argument, period. But it prevents os.sendfile() from converting to Argument Clinic, because Argument Clinic does not allow using Python keywords as parameter names (I already created a patch for conversion, but in needs to solve this issue first).

There are two ways to solve this issue.

1. Rename parameter "in" (and maybe "out" for consistency). "out_fd" and "in_fd" look good names (they are use in Linux manpage).

2. Make "out" and "in" positional-only parameters.
History
Date User Action Args
2019-10-05 15:04:03serhiy.storchakasetrecipients: + serhiy.storchaka
2019-10-05 15:04:03serhiy.storchakasetmessageid: <1570287843.24.0.0727618245068.issue38378@roundup.psfhosted.org>
2019-10-05 15:04:03serhiy.storchakalinkissue38378 messages
2019-10-05 15:04:03serhiy.storchakacreate