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

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

 



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),
Martin

Best wishes,
Jano

Attachment: signature.asc
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux