On 07/21/2014 03:26 PM, Victor Stinner wrote:
The PEP is accepted.
Thanks, Victor!
Congratulations, Ben!
--
~Ethan~
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.pyt
Le 21/07/2014 18:26, Victor Stinner a écrit :
I'm happy because the final API is very close to os.path functions and
pathlib.Path methods. Python stays consistent, which is a great power
of this language!
By the way, http://bugs.python.org/issue19767 could benefit too.
Regards
Antoine.
___
Ben Hoyt writes:
>> Note: listdir() accepts an integer path (an open file descriptor that
>> refers to a directory) that is passed to fdopendir() on POSIX [4] i.e.,
>> *you can't use scandir() to replace listdir() in this case* (as I've
>> already mentioned in [1]). See the corresponding tests fr
2014-07-22 4:27 GMT+02:00 Ben Hoyt :
>> The PEP is accepted.
>
> Superb. Could you please update the PEP with the Resolution and
> BDFL-Delegate fields?
Done.
Victor
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listi
Makes sense, thanks. -Ben
On Tue, Jul 22, 2014 at 4:57 PM, Nick Coghlan wrote:
>
> On 23 Jul 2014 02:18, "Victor Stinner" wrote:
>>
>> 2014-07-22 17:52 GMT+02:00 Ben Hoyt :
>> > However, given that we have to support this for listdir() anyway, I
>> > think it's worth reconsidering whether scandi
On 23 Jul 2014 02:18, "Victor Stinner" wrote:
>
> 2014-07-22 17:52 GMT+02:00 Ben Hoyt :
> > However, given that we have to support this for listdir() anyway, I
> > think it's worth reconsidering whether scandir()'s directory argument
> > can be an integer FD. Given that listdir() already supports
2014-07-22 17:52 GMT+02:00 Ben Hoyt :
> However, given that we have to support this for listdir() anyway, I
> think it's worth reconsidering whether scandir()'s directory argument
> can be an integer FD. Given that listdir() already supports it, it
> will almost certainly be asked for later anyway
> Note: listdir() accepts an integer path (an open file descriptor that
> refers to a directory) that is passed to fdopendir() on POSIX [4] i.e.,
> *you can't use scandir() to replace listdir() in this case* (as I've
> already mentioned in [1]). See the corresponding tests from [2].
>
> [1] https:/
Ben Hoyt writes:
> I think if I were doing this from scratch I'd reimplement listdir() in
> Python as "return [e.name for e in scandir(path)]".
...
> So my basic plan is to have an internal helper function in
> posixmodule.c that either yields DirEntry objects or strings. And then
> listdir() wou
Modify os.listdir() to use os.scandir() is not part of the PEP, you should
not do that. If you worry about performances, try to implement my free list
idea.
You may modify the C code of listdir() to share as much code as possible. I
mean you can implement your idea in C.
Victor
__
> I asked privately Guido van Rossum if I can be the BDFL-delegate for
> the PEP 471 and he agreed. I accept the latest version of the PEP:
>
> http://legacy.python.org/dev/peps/pep-0471/
Thank you!
> The PEP also explicitly mentions that os.walk() will be modified to
> benefit of the new os.
Hi,
I asked privately Guido van Rossum if I can be the BDFL-delegate for
the PEP 471 and he agreed. I accept the latest version of the PEP:
http://legacy.python.org/dev/peps/pep-0471/
I consider that the PEP 471 "scandir" was discussed enough to collect
all possible options (variations of th
12 matches
Mail list logo