Re: [PATCH v4 08/19] tools/docs: sphinx-build-wrapper: add a wrapper for sphinx-build

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

 



On Tue, Sep 09, 2025 at 09:21:35AM -0600, Jonathan Corbet wrote:
> Another nit:
> 
> >         # sphinxdirs can be a list or a whitespace-separated string
> >         #
> >         sphinxdirs_list = []
> >         for sphinxdir in sphinxdirs:
> >             if isinstance(sphinxdir, list):
> >                 sphinxdirs_list += sphinxdir
> >             else:
> >                 for name in sphinxdir.split(" "):
> >                     sphinxdirs_list.append(name)
> 
> That inner loop just seems like a complicated way of saying:
> 
> 	sphinxdirs_list += sphinxdir.split()

Yeah, it sounds so ;-)

At the development code version, I had some prints there to be sure
all cases were picked, so I ended coding it as a loop. I forgot to
return it to the much nicer "+=" syntax after finishing debugging it.

-- 
Thanks,
Mauro




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux