Am 01.07.14 09:44, schrieb Victor Stinner:
> scandir(fd) must not close the file descriptor, it should be done by
> the caller. Handling the lifetime of the file descriptor is a
> difficult problem, it's better to let the user decide how to handle
> it.
This is an open issue still: when is the fil
> 2014-07-02 12:51 GMT+02:00 Charles-François Natali :
>> I don't think we should support it: it's way too complicated to use,
>> error-prone, and leads to messy APIs.
>
> Can you please elaborate? Which kind of issue do you see? Handling the
> lifetime of the directory file descriptor?
Yes, among
2014-07-02 12:51 GMT+02:00 Charles-François Natali :
> I don't think we should support it: it's way too complicated to use,
> error-prone, and leads to messy APIs.
Can you please elaborate? Which kind of issue do you see? Handling the
lifetime of the directory file descriptor?
You don't like the
2014-07-01 8:44 GMT+01:00 Victor Stinner :
>
> IMO we must decide if scandir() must support or not file descriptor.
> It's an important decision which has an important impact on the API.
I don't think we should support it: it's way too complicated to use,
error-prone, and leads to messy APIs.
Ben Hoyt writes:
> Thanks, Victor.
>
> I don't have any experience with dir_fd handling, so unfortunately
> can't really comment here.
>
> What advantages does it bring? I notice that even os.listdir() on
> Python 3.4 doesn't have anything related to file descriptors, so I'd
> be in favour of not
2014-07-01 14:26 GMT+02:00 Ben Hoyt :
> Thanks, Victor.
>
> I don't have any experience with dir_fd handling, so unfortunately
> can't really comment here.
>
> What advantages does it bring? I notice that even os.listdir() on
> Python 3.4 doesn't have anything related to file descriptors, so I'd
>
Thanks, Victor.
I don't have any experience with dir_fd handling, so unfortunately
can't really comment here.
What advantages does it bring? I notice that even os.listdir() on
Python 3.4 doesn't have anything related to file descriptors, so I'd
be in favour of not including support. We can always