title: How can PyImport_AppendInittab fail?
body: <p>According to the official docs, <a href="http://pyspanishdoc.sourceforge.net/api/importing.html#l2h-138" rel="nofollow">PyImport_AppendInittab</a> will return -1 on failure. It does not, however, specify why this function would fail.</p>
  
  <p>I'd like to know if it can only fail due to the programmer's fault (incorrect arguments, not being called at the right time, etc), or if it can also fail because of some other factors that are out of the programmer's control (like Python not being installed).</p>
  
  <p>I'm asking because I want to know if I should handle this with an assert or an exception. Also, in case I should handle it with exceptions, is there any way for me to catch an error message from the Python API that specifies why the function call failed?</p>