Login
You're viewing the ruby.social public feed.
  • Nov 1, 2026, 7:56 PM

    @compfu

    Before the ternary "operator" was available in Python expressions, I used to see this a fair bit:

    item = (things or [None])[0]

    I probably wouldn't use it today, though.

    💬 1🔄 0⭐ 0

Replies