I'm trying to identify the parameters of a function for which default values are not set. I'm using inspect.signature(func).parameters.value() function which gives a list of function parameters. Since I'm using PyCharm, I can see that the parameters for which the default value is not set have their Parameter.default attribute set to inspect._empty. I'm declaring the function in the following way:
def f(a, b=1):
pass
So, the default value of a is inspect._empty. Since inspect._empty is a private attribute, I thought that there might be a method for checking if a value is inspect._empty, but I couldn't find it.