I have this callable object bool_getter := vars(type(None))["__bool__"].__get__ (of type types.MethodWrapperType). Is there a way to make this bool_getter return None's method None.__bool__ by calling it? I didn't figure it out after trying a few obvious choices. (The value of None.__bool__ is not identical every time the expression is evaluated, so I want bool_getter to return not the identical but just an equal object.)
In case the question didn't make full sense to you, please consider doing one of the following things.
Please show me a way to construct an iterable
argsand a mappingkwargssuch that you get an objectvalue := bool_getter(*args, **kwargs)successfully, and thatvaluewill be equal toboolNone := None.__bool__. That is,type(value)should betype(boolNone), namely,types.MethodWrapperTypeandvalue == boolNonemust beTrue. (In my experience,boolNonealways satisfiesboolNone == None.__bool__.)If that's impossible to do, please show me how you can tell it.