title: Creating methods with partial
body: <pre><code>class MyClass(FinderClass):
      def _find(self, search, attribute):
          if attribute == 'ip':
              locator = "some_locator"
          if attribute == 'name':
              locator = "other_locator"
          return self.finder.find(search, locator)
  
      def find_by_ip(self, ip):
          return self._find(ip, 'ip')
  </code></pre>
  
  <p>Can I rewrite the above example using functools' partial? What I would like to have if it's possible: argument ip should be named ip and not search, function should be created inside of the class.</p>
  
  <p>What I would like to get is something simmilar to this:</p>
  
  <pre><code>class MyClass(FinderClass):
      def _find(self, search, attribute):
          if attribute == 'ip':
              locator = "some_locator"
          if attribute == 'name':
              locator = "other_locator"
          return self.finder.find(search, locator)
  
      find_by_ip = functools.partial(_find, attribute='ip')
  </code></pre>
  
  <p>This works but you have to call it like this which is not cool:</p>
  
  <pre><code>mc = MyClass()
  mc.find_by_ip(mc, '127.0.0.1')
  </code></pre>
  
  <p>Also argument to the function is called <code>search</code> and not <code>ip</code>, but this is kinda OK.</p>