• python module的结构


    python有很多module,下面是module的结构图:

    拿httplib做例子,httlip module有:

    4个class( HTTPConnection,HTTPSConnection,HTTPResponse,HTTPMessage ),

    12个exception( HTTPException,NotConnected,InvalidURL,UnknownProtocol,UnknownTransferEncoding,UnimplementedFileMode,IncompleteRead,ImproperConnectionState,CannotSendRequest,CannotSendHeader,ResponseNotReady,BadStatusLine 

    3个constant( HTTP_PORT,HTTPS_PORT,responses 

    class会包含method和attribute(不一定有)

    拿HTTPResponse做例子,HTTPResponse有:

    4个method( read(),getheader(name[,default]),getheaders(),fileno() )

    4个constant( msg,version,status,reason )

  • 相关阅读:
    Js/Jquery获取iframe中的元素
    js常用技巧汇总
    jquery常用技巧
    Tomcat远程调试
    常用SQL
    CRM-stark组件
    面试题-linux基础
    vue2-通过axios实现数据请求
    Vue01
    面试题之python基础
  • 原文地址:https://www.cnblogs.com/HpuAcmer/p/4074768.html
Copyright © 2020-2023  润新知