> -----Original Message----- > From: [email protected] <openembedded- > [email protected]> On Behalf Of Bartosz Golaszewski > Sent: den 31 mars 2020 11:43 > To: Richard Purdie <[email protected]> > Cc: Khem Raj <[email protected]>; Armin Kuster <[email protected]>; > Jerome Neanne <[email protected]>; Quentin Schulz > <[email protected]>; Patches and discussions about the > oe-core layer <[email protected]>; Bartosz > Golaszewski <[email protected]> > Subject: Re: [OE-core][RFC PATCH 2/2] image.bbclass: deploy image > artifacts in stages > > pon., 30 mar 2020 o 18:31 Richard Purdie > <[email protected]> napisaĆ(a):
[cut]
> > Also, you used {}.format which I'm torn on since most of the codebase
> > uses the other approach.
>
> I couldn't find any official guidelines for that. {} is the preferred
> way in Python. Maybe it's time to start slowly converting the bitbake
> codebase?
If we have waited so long to change string formatting, why not wait
till we require Python 3.6 and go for f-strings directly? With Tim's
proposed patch we will soon require Python 3.5 as a minimum, so 3.6
as a minimum requirement is probably not too long in the future...
Anyway, since I had fun generating it, I have included a graph
depicting the use of % vs .format() for all Poky releases (and the
script used to generate it; run it in a pristine clone of Poky for
an interactive experience). Enjoy. :)
(For the curious, the first use of .format() was introduced to
bitbake almost exactly 10 years ago in the Laverne release.)
//Peter
formattingwar-plot.sh
Description: formattingwar-plot.sh
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#136911): https://lists.openembedded.org/g/openembedded-core/message/136911 Mute This Topic: https://lists.openembedded.org/mt/72497792/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
