Oct. 25, 2021
9:08 a.m.
Something like this:
\>\>\> class Movement: ... def __eq__(self, x): ... return type(x) is Movement ... \>\>\> dummy = Movement() \>\>\> # suppose `bar` is a list of every recorded action in a game \>\>\> if dummy in bar: ... if dummy is in bar: # check if the dummy value is in the actions ... raise TypeError("cannot put dummy value in actions log")