Conversation
Notices
-
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Monday, 18-Dec-2023 01:52:57 JST Pleroma-tan i was laying in bed thinking about how interpreters work and thought of this hypothetical that i just had to try -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Monday, 18-Dec-2023 01:54:28 JST Pleroma-tan Part of me feels like this really shouldn't work -
Embed this notice
framebuffer :archlinux: :gentoo: :tuxspin: (fuzzylinuxuser@den.raccoon.quest)'s status on Monday, 18-Dec-2023 01:54:50 JST framebuffer :archlinux: :gentoo: :tuxspin: @kirby@lab.nyanide.com right-associative, yeh
Pleroma-tan likes this.Pleroma-tan repeated this. -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Monday, 18-Dec-2023 01:57:11 JST Pleroma-tan @locness3 im not quite sure, im just used to people always doing assignment statements per line, so i guess this just looks wrong -
Embed this notice
locness3 (locness3@fosstodon.org)'s status on Monday, 18-Dec-2023 01:57:12 JST locness3 @kirby why
-
Embed this notice
framebuffer :archlinux: :gentoo: :tuxspin: (fuzzylinuxuser@den.raccoon.quest)'s status on Monday, 18-Dec-2023 01:57:46 JST framebuffer :archlinux: :gentoo: :tuxspin: @kirby@lab.nyanide.com https://en.wikipedia.org/wiki/Operator_associativity
Pleroma-tan likes this. -
Embed this notice
m0xEE (m0xee@social.librem.one)'s status on Monday, 18-Dec-2023 02:06:59 JST m0xEE @kirby
This is called chained assignment: https://en.wikipedia.org/wiki/Assignment_(computer_science)#Chained_assignment
And it's handled differently in different languages. In Python it seemingly works exactly it would in C, but in fact it's somewhat of a special case.
It's often done one-per-line just to improve readability — so people using different languages won't be confused by behaviour they might not expect.
@locness3In conversation permalink Attachments
Pleroma-tan likes this.
-
Embed this notice