Solved

"is not True" — isn't that bad style?

HenryWritesOP

PEP 8 says don't compare booleans with is.

3

Comments 4

Join the discussion

Already have an account? Log in

  1. JackStack Solutionreplies: 2

    In general, yes. But here it's intentional: you want to accept only the value True and reject truthy values like "yes" or 1. For irreversible actions, strictness beats style rules. The challenge explains exactly this.

    7
      1. BellaRossi

        Some real APIs use the same pattern for destructive actions: delete(id, *, force=True).

        6
    1. OllieGrant

      The * in the signature is the main lesson — the caller can't pass confirm without naming it.

      5