title: How to check if default value for python function argument is set using inspect?
body: <p>I'm trying to identify the parameters of a function for which default values are not set. I'm using <code>inspect.signature(func).parameters.value()</code> 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 <code>Parameter.default</code> attribute set to <code>inspect._empty</code>. I'm declaring the function in the following way:</p>
  <pre class="lang-py prettyprint-override"><code>def f(a, b=1):
      pass
  </code></pre>
  <p>So, the default value of <code>a</code> is <code>inspect._empty</code>. Since <code>inspect._empty</code> is a private attribute, I thought that there might be a method for checking if a value is <code>inspect._empty</code>, but I couldn't find it.</p>