title: How can we define a function without using the `def` keyword?
body: <p>It's possible to define a class without using the <code>class</code> keyword.<br>
  The following ...</p>
  
  <pre><code>get_i = lambda self: self.i    
  get_i.__name__ = 'get_i'
  get_i.__qualname__ = 'Klass2.get_i'
  dct = dict(a=1, i=4, get_i=get_i)    
  Klass2 = type('Klass2', (SuperK,), dct)
  </code></pre>
  
  <p>... produces the same end result as:</p>
  
  <pre><code>class Klass1(SuperK):
      a = 1
      i = 4
      def get_i(self):
          return self.i
  </code></pre>
  
  <p>How can we do something similar for functions? That is, how can we define a function without using the <code>def</code> or <code>lambda</code> keywords? What might a pure-python implementation of <code>dehf</code> look like if the following two pieces of code created identical <code>foo</code>s?</p>
  
  <pre><code>def foo(bar):
      bar += 934
      return bar
  
  foo = dehf(blah, blah, blah, blah, [...])
  </code></pre>