On Mon, Jun 4, 2018 at 3:54 AM, Nikos Alexandris <[email protected]> wrote: > * Sanjeet <[email protected]> [2018-06-03 18:08:29 -0600]: >> >> I can resolve this by using fomat() like this: >> msg = _(("Module run {} {} ended with error").format(module,code)) >> >> Do you think this is a good way to resolve this? >> Is "format()" going to work well with translations using the >> ''gettext()'' used as _() as shown in the above line? > > Normally everyone would want to follow the "new" style of formatting > strings, which offers many more options. Why stick to the old style, > i.e. using the % notation?
Hi Nikos, Yes, the .format() style should be followed in most cases. I could be wrong but I guess the old style has been used to support older versions of Python. But it seems we can use the 'format' style since we are only keeping support for Python 2.7 (or 2.6 if possible). Sanjeet _______________________________________________ grass-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/grass-dev
