title: Underscore variable with walrus operator in Python
body: <p>In Python, the variable name <code>_</code> (underscore) is often used for throwaway variables (variables that will never be used, hence do not need a proper name).</p>
  <p>With the walrus operator, <code>:=</code>, I see the need for a variable that is rather short lived (used in say only one line of code). I wonder if the use of <code>_</code> is reasonable to use also in this case, or if it might be confusing for someone reading the code?</p>
  <p>Example:</p>
  <pre class="lang-py prettyprint-override"><code>a = (dummy := pd.Series([1, 2, 3, 4, 5]))[dummy &gt; 2]
  </code></pre>
  <p>Here a pandas series is created and immediately filtered. The name <code>dummy</code> could in my opinion be replaced with <code>_</code>:</p>
  <pre class="lang-py prettyprint-override"><code>a = (_ := pd.Series([1, 2, 3, 4, 5]))[_ &gt; 2]
  </code></pre>