this post was submitted on 13 Dec 2025
169 points (96.7% liked)

Greentext

7454 readers
721 users here now

This is a place to share greentexts and witness the confounding life of Anon. If you're new to the Greentext community, think of it as a sort of zoo with Anon as the main attraction.

Be warned:

If you find yourself getting angry (or god forbid, agreeing) with something Anon has said, you might be doing it wrong.

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] rtxn@lemmy.world 18 points 16 hours ago (2 children)

[lady for lady in ladies if lady.is_single] just doesn't have the same bop.

[–] alias_qr_rainmaker@lemmy.world 7 points 16 hours ago

list comprehensions aren't changed much. but a statement like dog = Dog(name="fido") is transpiled to the dog is now a Dog with name 'fido'

the language uses backticks for strings. it handles nested stringly nicely because of it

[–] lemmyman@lemmy.world 1 points 10 hours ago* (last edited 10 hours ago) (1 children)

Can I just say that as someone who only codes tangentially to my work, code and documentation that uses the same word 2 or 3 times in an expression, when they mean different things, is such an immense pet peeve of mine when learning something new.

I'm already struggling with everything else about it, and now I have to parse out which lady is which and what the hell each one is supposed to be

object Object(object = object);

Statements dreamed up by the utterly deranged.

[–] rtxn@lemmy.world 2 points 10 hours ago* (last edited 10 hours ago) (1 children)

That's just Python's generator syntax. Not all that difficult to parse once you get a feel for it. Plus syntax highlighting helps.

(OUTPUT_EXPRESSION for ITEM in INPUT_ITERABLE if CONDITION)
[–] ryannathans@aussie.zone 1 points 10 hours ago

it's list comprehension syntax, not generator syntax