Sujet : Re: Tabs As Syntax
De : candycanearter07 (at) *nospam* candycanearter07.nomail.afraid (candycanearter07)
Groupes : comp.os.linux.advocacyDate : 22. Mar 2024, 17:10:12
Autres entêtes
Organisation : the-candyden-of-code
Message-ID : <utk70k$305bf$3@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : slrn/pre1.0.4-9 (Linux)
rbowman <
bowman@montana.com> wrote at 03:13 this Friday (GMT):
On Thu, 21 Mar 2024 09:22:06 -0400, DFS wrote:
>
for i in range(2,11): print("%d made %d look like a foo^2" % (i*i,i))
>
Embrace f strings. Unless you're running an obsolete version of course.
>
Some of the improvements leave me with a yawn but I use
>
$"The quick red {animal} jumped over the brain dead Windows {user}"
>
so I really liked that addition. Yeah, the % is sort of like C but half
the time I screw up the tuple. format was more work too.
f-strings are so nice, especially since you can use it as arguments for
other functions and don't have to rely on a temporary string var.
-- user <candycane> is generated from /dev/urandom