bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib-tool.py: Update TODO file


From: Collin Funk
Subject: Re: gnulib-tool.py: Update TODO file
Date: Sat, 23 Mar 2024 13:27:09 -0700
User-agent: Mozilla Thunderbird

Hi Bruno,

On 3/23/24 8:30 AM, Bruno Haible wrote:
> So, I've trimmed and reorganized the TODO file.

Thanks for checking these. I was going to mention a few of them but
you beat me to it. :)

Since one bullet point is inlining 'sed' invocations, it might also be
worth considering doing the same for 'find'. It is used in various
places, but there is this docstring in GLModuleSystem.list():

> Return the available module names as tuple. We could use a combination
> of os.walk() function and re module. However, it takes too much time to
> complete, so this version uses subprocess to run shell commands.

I haven't tested it, but I assume that this probably isn't the case
anymore? Python has plenty of easy to use builtin functions, so I
don't see much point in using 'find'. Then we don't have to think
about using extensions or compatibility between implementations.

Most of the functions that can replace this are in the os.path or Path
modules [1] [2].

Collin

[1] https://docs.python.org/3/library/os.path.html
[2] https://docs.python.org/3/library/pathlib.html#module-pathlib



reply via email to

[Prev in Thread] Current Thread [Next in Thread]