[libvirt] [PATCH] check-symfile: Use pythonesque string formatting instead of perl

Ján Tomko jtomko at redhat.com
Thu Nov 28 13:32:54 UTC 2019

On Thu, Nov 28, 2019 at 11:43:01AM +0100, Martin Kletzander wrote:
>The advantage of "".format() is that you cannot make one mistake that can happen
>with the currently used version and that is that sometimes you might need to
>make sure the variable is in a tuple, i.e. difference between `params` and
>`(params,)`.  Even though this is *very* corner case, you still don't know if
>the word after `%` is the only parameter or the iterable of parameters to be
>used.  Even though this is not *that* corner case, the mistakes that would cause
>this would probably be caught quickly and auxiliary build scripts are not
>something that needs to care about translations.
>Since the biggest bikeshedding^Wconversations usually revolve around the
>smallest patches, I felt like expressing myself as well =)
>But anyway, even though "%d" is more C-like, when talking about the parameters, the `.format()` is more C-like IMHO.  More importantly it should be the same in all of the code, so that it is consistent.  And *most* importantly!!! It is just a auxiliary build script, just make sure it works and that's it =D

*an auxiliary

>Have a nice day (with my preferred colour of the bikeshed),

Best wishes,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20191128/4d18ede8/attachment-0001.sig>

More information about the libvir-list mailing list