Re: Min. req. of programming language standard support, GRASS GIS 8

Vaclav Petras <[email protected]> Wed, 3 Feb 2021 23:07:58 -0500
Newsgroups gmane.comp.gis.grass.devel
Message-ID <CABo5uVufxREfdtVVdd4aAKdghc0oeLvKv0RQUtRSWicVKx8BvA@mail.gmail.com>
On Wed, Feb 3, 2021 at 2:47 PM Anna Petrášová <[email protected]> wrote:

>
>
> On Tue, Feb 2, 2021 at 11:20 AM Nicklas Larsson <[email protected]>
> wrote:
>
>>
>> Well, I don’t have a very strong opinion regarding 3.7, but personally
>> I’d say 3.6 is an absolute minimum. I presume, for example, most of us
>> would prefer to use f-strings for string formatting.
>>
>
> yes, f-strings are nice although they have limitations for using with
> translatable strings (Vashek can expand on that)
>

Right, it is important to note that the f-strings are great for formatting
outputs and other strings in general, but don't work well with gettext. The
two following lines are not equivalent.

_("value: {a}").format(**locals())
_(f"value: {a}")

There are still valid use cases for f-strings in GRASS, but it won't be
messages.

_______________________________________________
grass-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-dev