• model_tar_gz@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    Just remember that even though None is Falsy, an array of Nones is Truthy. Gets me every time. I fucking understand it logically (because the array itself exists) but damnit if I can make my lizard brain comprehend it while coding it.

    • Skyhighatrist
      link
      fedilink
      arrow-up
      4
      ·
      1 year ago

      because the array itself exists

      More specifically it’s because the array isn’t empty.

      • model_tar_gz@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Yup you’re more right than I was. An empty array is still Falsy even though it exists. I accept the correction.