not_instance_eval#
- class brainstate.util.not_instance_eval(*cls)#
Create a partial function to check if input is NOT an instance of given classes.
- Parameters:
*cls (
Type) – Classes to check against.- Returns:
A function that returns True if input is not an instance of any given class.
- Return type:
Examples
>>> not_int = not_instance_eval(int) >>> not_int(5) False >>> not_int("hello") True