title: Merge functions with 2 non-overlapping sets of parameters in a pythonic way
body: <p>I parse abstract syntax trees in Python. For this, I have designed a custom tree structure &amp; an interface to operate on it. Among others, I offer 2 different search functions: </p>
  
  <pre><code>def findNode(self, start, name)
  </code></pre>
  
  <p>&amp;</p>
  
  <pre><code>def findNodeByLineno(node, lineno, prevNode, nodeType=None)
  </code></pre>
  
  <p>The first function searches for a node given name, the latter one compares line numbers &amp; node's type, if given.
  My subconsciousness tells me that this a leaky interface design, but I cannot come up with a decision how to merge these two functions in one common function.</p>
  
  <pre><code>def findNode(self, start, name, lineno, prevNode, nodeType) 
  </code></pre>
  
  <p>is in my opinion also wrong, because it does not make clear that the set of parameters can be split only in two groups. A user cannot search for a node based only on prevNode or on nodeType alone. Having two different functions seems like a very C-like solution.</p>
  
  <p>Is there a pythonic way to solve this design conflict?</p>