title: In Jython, can I make an inline anonymous class that implements a Java interface?
body: <p>In Java, I can say</p>
  
  <pre><code>Thread t = new Thread(){
      public void run(){ // do stuff }
  }
  </code></pre>
  
  <p>(or something much like that) to declare an anonymous class inline.  This is most useful for making event handlers or other callback sorts of things, that in any <em>sensible</em> language <a href="http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html">wouldn't require an object to own them</a> in the first place.</p>
  
  <p>I face the same problem in Jython -- I want to define an event handler, but I don't want to build a whole standalone class to do so.</p>
  
  <p>Ideally, I'd just be able to pass a lambda and be done with it, but if this is possible, I can't find it anywhere in the docs.</p>