fcntl semantics

Martin von Loewis loewis at informatik.hu-berlin.de
Fri Nov 2 19:02:11 CET 2001

buzmeg at newsguy.com writes:

> All the information from the C function fcntl is accessible without
> any of the nasty OS/compiler dependence.

It is not. Systems vary in what "cmd" args they accept for fcntl(2),
so Python would need to know in advance what all possible commands for
fcntl are, and also know what the corresponding args are (fcntl really
is a varargs function).

If Python was changed to expose a set of well-known commands, you'd
lose flexibility: if you use a system that offers an unsupported
command, you could not invoke this command. Currently, you can.


More information about the Python-list mailing list