Part of my code relies on a comparison between two items, and it may end up comparing against a variable that doesn’t exist. As such I will go through and put in filler variable values for the sets to make sure they both are defined and can be compared.
However, if I add a filler value I don’t want it to be possible to be matched to any other value. I’d use None, however it’s possible that the other value could also be None. What I’m wondering is if there is a good way to make sure the filler value will not match anything? The already defined values could be anything (as they are user defined).
Also I’m open to suggestions of other ways to solve this problem.
Seems like you could define a custom class to compare against. For example:
The comparison should always fail, as someValue won’t be an instance of NoValue