[PATCH] waf: Fix the build on openbsd
Volker Lendecke
Volker.Lendecke at SerNet.DE
Tue Feb 3 02:33:31 MST 2015
On Tue, Feb 03, 2015 at 11:06:47AM +0200, Alexander Bokovoy wrote:
> > + pattern = '%s.%s' % (pattern, nums[0])
> > + if len(nums) >= 2:
> > + pattern += '.%s' % nums[1]
> I wonder if using a bit more of a Python would work too:
> pattern = '.'.join([pattern]+[str(d) for d in nums])
>
> It works like this:
> >>> pattern='name.so'
> >>> nums=[0,2]
> >>> '.'.join([pattern]+[str(d) for d in nums])
> 'name.so.0.2'
> >>> nums=[0]
> >>> '.'.join([pattern]+[str(d) for d in nums])
> 'name.so.0'
> >>>
That would behave differently for nums with more than 2
entries. Is that wanted?
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical
mailing list