[Python-Dev] PEP 362 Third Revision (original) (raw)

Benjamin Peterson benjamin at python.org
Fri Jun 15 21:06:43 CEST 2012


2012/6/15 Larry Hastings <larry at hastings.org>:

On 06/15/2012 11:46 AM, R. David Murray wrote:

Adding a os.haveopenat seems more reasonable than adding isimplemented to every signature object. And more useful, as well; it provides a much more specific piece of information.

We already have "os.haveopenat"; it's spelled sysconfig.getconfigvar('HAVEOPENAT').  But, assuming I land issue 14626, this leads us to: Q: Can I use the dirfd parameter to os.open? A: Only if sysconfig.getconfigvar('HAVEOPENAT') is true. Q: Can I use the fd parameter to os.utime? A: Only if sysconfig.getconfigvar('HAVEFUTIMENS') or sysconfig.getconfigvar('HAVEFUTIMES') is true. I feel this interface lacks civility.

There's no reason this couldn't be wrapped into some sort of os level attribute or function.

-- Regards, Benjamin



More information about the Python-Dev mailing list