New submission from STINNER Victor:

posix_truncate() accepts a file descriptor, so os.ftruncate() can be removed 
from Python 3.3.

    memset(&path, 0, sizeof(path));
    path.function_name = "truncate";
#ifdef HAVE_FTRUNCATE
    path.allow_fd = 1;
#endif
    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&:truncate", keywords,
                                     path_converter, &path,
                                     _parse_off_t, &length))
        return NULL;

----------
messages: 167311
nosy: haypo, larry
priority: deferred blocker
severity: normal
status: open
title: Why do we have os.truncate() and os.ftruncate() whereas os.truncate() 
accepts a file descriptor?
versions: Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15547>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to