• AnAverageSnoot@lemmy.ca
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    2 hours ago

    Your variables are already booleans, so you can just write:

    if wearing_glasses and is_brightly_lit

    • pretzelz@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      26 minutes ago

      Are they though? Maybe they are inputs that haven’t been sanitised but the language has two kinds of equals and is you use the double equals then it tries to coerce it for you. Lol that with would be silly!