haha, yeah went back and forth on weather to have None nodes or not have the key altogether.  I guess it does make sense to just not have the key, though having None in the left/right, makes it easier to write recursive algorithms on the resulting object:

    def foo(node) :
      if not node : return 'leaf'
      
      # do stuff
      
      foo(node['left'])
      foo(node['right'])

vs

    def foo(node) :
      # do stuff
      
      if 'left' in node :
        foo(node['left'])
      else :
        return 'leaf'
      
      if 'right' in node :
        foo(node['right']
      else :
        return 'leaf'

  I can see either case.