def create_py3_docs():
    """
    Create the include files for py3 documentation.
    """
    # we want the correct .rst 'type' for our data
    trans = {"methods": "function", "exceptions": "exception", "constants": "attribute"}
    data = get_py3_info()
    for k, v in data.items():
        output = []
        for name, desc in v:
            output.append("")
            output.append(".. _%s:" % name)  # reference for linking
            output.append("")
            output.append(".. py:%s:: %s" % (trans[k], name))
            output.append("")
            output.extend(auto_undent(desc))
        with open("../doc/py3-%s-info.inc" % k, "w") as f:
            f.write("\n".join(output))
def create_py3_docs ( ) : trans = { "methods" : "function" , "exceptions" : "exception" , "constants" : "attribute" } data = get_py3_info ( ) for k , v in data . items ( ) : output = [ ] for name , desc in v : output . append ( "" ) output . append ( ".. _%s:" % name ) output . append ( "" ) output . append ( ".. py:%s:: %s" % ( trans [ k ] , name ) ) output . append ( "" ) output . extend ( auto_undent ( desc ) ) with open ( "../doc/py3-%s-info.inc" % k , "w" ) as f : f . write ( "\n" . join ( output ) )
Create the include files for py3 documentation.