[issue46227] add pathlib.Path.walk method

2022-01-08 Thread Stanislav Zmiev
Stanislav Zmiev added the comment: Thanks for the tip! Hopefully, I created it correctly: https://discuss.python.org/t/add-pathlib-path-walk-method/ It is currently on review. -- ___ Python tracker

[issue46227] add pathlib.Path.walk method

2022-01-07 Thread Éric Araujo
Éric Araujo added the comment: The idea is interesting, and I agree that glob with a maxi wildcard is not a great solution. There is discussion on the PR about adding walk vs extending iterdir; could you post a message on discuss.python.org and sum up the the discussion? (Pull requests on

[issue46227] add pathlib.Path.walk method

2022-01-02 Thread Stanislav Zmiev
Change by Stanislav Zmiev : -- keywords: +patch pull_requests: +28552 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30340 ___ Python tracker ___

[issue46227] add pathlib.Path.walk method

2022-01-02 Thread Jacob Nilsson
Change by Jacob Nilsson : -- nosy: +ajoino ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46227] add pathlib.Path.walk method

2022-01-02 Thread Stanislav Zmiev
Stanislav Zmiev added the comment: Some people could suggest using Path.glob instead but I found it to be less convenient for some use cases and generally slower (~2.7 times slower). >>> timeit("list(Path('Lib').walk())", number=100, globals=globals()) 1.9074640140170231 >>>

[issue46227] add pathlib.Path.walk method

2022-01-02 Thread Barney Gale
Change by Barney Gale : -- nosy: +barneygale ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46227] add pathlib.Path.walk method

2022-01-02 Thread Stanislav Zmiev
New submission from Stanislav Zmiev : Pathlib is great, yet every time I have to parse a bunch of files, I have to use os.walk and join paths by hand. That's not a lot of code but I feel like pathlib should have higher-level abstractions for all path-related functionality of os. I propose we