Message 159626 - Python tracker (original) (raw)

Well, it always boils down to the same problem: should we offer thin wrappers around underlying syscalls or offer higher-level functions? I personally think that offering mere wrappers around syscalls doesn't make much sense: Python is a very-high level language, and so should its library be.

Now, I'm in favor of adding optional argument to tune the behavior with regard to symlinks, however I'm skeptical about merging regular syscalls and *at() syscalls, for the following reasons:

stat(path, *, followlinks=True, dirfd=None) is backwards, it should be stat(dirfd, path, *, followlinks=True)

since, path is relative to dirfd.

Actually, the proper way to do this would be to use overloading, but Python doesn't support it (and even if it did, I think overloading would probably be a bad idea anyway).