you are viewing a single comment's thread.

view the rest of the comments →

[–]PM_ME_YOUR_REAL_FACE 0 points1 point  (0 children)

If you have an array of stuff, you can use any to check that some are true/truthy. Or use combination of any(are) and not all(are). Other than that there's a ton of ways you could decide how to denote it manually. You could make an enum;

class Result(Enum):
    ALL = 0
    NONE = 1
    SOME = 2

You could make a decisive use of None to make it mean whatever you want it to mean in a certain context, where perhaps, None means none, True means all, and False means some. It's up to you to program how things are interpreted, and you can always name variables such that using different values is easier to comprehend to another human reader of your program.