Sujet : Re: Tabs As Syntax
De : bowman (at) *nospam* montana.com (rbowman)
Groupes : comp.os.linux.advocacyDate : 22. Mar 2024, 05:06:35
Autres entêtes
Message-ID : <l64atrF2m1hU15@mid.individual.net>
References : 1 2 3 4 5
User-Agent : Pan/0.149 (Bellevue; 4c157ba)
On Thu, 21 Mar 2024 07:22:01 -0000 (UTC), Lawrence D'Oliveiro wrote:
On 21 Mar 2024 07:12:03 GMT, rbowman wrote:
Whoopee! Python wins by one line! Unless of course
for (i=0; i<10; i++) {printf("foo[%d] is %s\n", i, foo[i]);}
for i in range(10): print(f"foo[{i} is {foo[i]}")
is syntactically valid Python.
Yes it is. The PEP8 police will be paying you a visit shortly. Both black
and ruff would try to fix it for you.
black junk.py
reformatted junk.py
All done! ✨ 🍰 ✨
1 file reformatted.
for i in range(10):
print(f"foo[{i} is {foo[i]}")