[Python-Dev] Exposing different versions of a system call in Python (original) (raw)
Pablo Galindo Salgado pablogsal at gmail.com
Fri Jan 19 04:28:01 EST 2018
- Previous message (by thread): [Python-Dev] Drop support for old unsupported FreeBSD and Linux kernels?
- Next message (by thread): [Python-Dev] Exposing different versions of a system call in Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello everyone,
In today's episode of exposing useful Linux system calls I am exposing preadv2 in this PR:
https://github.com/python/cpython/pull/5239
as requested in this issue:
https://bugs.python.org/issue31368
As njsmith has commented in the PR, preadv2 only exists because regular preadv was missing a flags argument, and in C the only way to add an argument is to make a new function. In Python we have already exposed preadv2 and a possible solution would be add a optional argument that passes the new parametera to preadv and calls preadv2 if this happens.
On the other side, we have pipe and pipe2 as an example of exposing two versions when this situation happens.
The question is:
What is preferable, exposing both functions or augment the old one?
Thank you everyone for your time! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20180119/e5690869/attachment.html>
- Previous message (by thread): [Python-Dev] Drop support for old unsupported FreeBSD and Linux kernels?
- Next message (by thread): [Python-Dev] Exposing different versions of a system call in Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]