title: Alternative to dict comprehension prior to Python 2.7
body: <p>How can I make the following functionality compatible with versions of Python earlier than Python 2.7?</p>
  
  <pre><code>gwfuncs = [reboot, flush_macs, flush_cache, new_gw, revert_gw, send_log]      
  gw_func_dict = {chr(2**i): func for i, func in enumerate(gwfuncs[:8])}
  </code></pre>