Skip to content

Commit

Permalink
Merge pull request qiwsir#108 from zen-young-chan/patch-5
Browse files Browse the repository at this point in the history
Update 225.md
  • Loading branch information
qiwsir committed May 30, 2016
2 parents f66097b + 14efc25 commit d8da708
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 225.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ urllib2是另外一个模块,它跟urllib有相似的地方——都是对url
>>> dir(urllib2)
['AbstractBasicAuthHandler', 'AbstractDigestAuthHandler', 'AbstractHTTPHandler', 'BaseHandler', 'CacheFTPHandler', 'FTPHandler', 'FileHandler', 'HTTPBasicAuthHandler', 'HTTPCookieProcessor', 'HTTPDefaultErrorHandler', 'HTTPDigestAuthHandler', 'HTTPError', 'HTTPErrorProcessor', 'HTTPHandler', 'HTTPPasswordMgr', 'HTTPPasswordMgrWithDefaultRealm', 'HTTPRedirectHandler', 'HTTPSHandler', 'OpenerDirector', 'ProxyBasicAuthHandler', 'ProxyDigestAuthHandler', 'ProxyHandler', 'Request', 'StringIO', 'URLError', 'UnknownHandler', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__version__', '_cut_port_re', '_opener', '_parse_proxy', '_safe_gethostbyname', 'addinfourl', 'base64', 'bisect', 'build_opener', 'ftpwrapper', 'getproxies', 'hashlib', 'httplib', 'install_opener', 'localhost', 'mimetools', 'os', 'parse_http_list', 'parse_keqv_list', 'posixpath', 'proxy_bypass', 'quote', 'random', 'randombytes', 're', 'request_host', 'socket', 'splitattr', 'splithost', 'splitpasswd', 'splitport', 'splittag', 'splittype', 'splituser', 'splitvalue', 'sys', 'time', 'toBytes', 'unquote', 'unwrap', 'url2pathname', 'urlopen', 'urlparse', 'warnings']

比较常用的比如`urlopen()``urllib.open()`是完全类似的。
比较常用的比如`urlopen()``urllib.urlopen()`是完全类似的。

但是,要注意,上述言论仅仅是针对Python 2的,在Python 3中,已经没有`urllib2`这个模块了,取代它的是`urllib.request`

Expand Down Expand Up @@ -309,4 +309,4 @@ Python 3:

[总目录](./index.md)   |   [上节:标准库(5)](./224.md)   |   [下节:标准库(7)](./226.md)

如果你认为有必要打赏我,请通过支付宝:**[email protected]**,不胜感激。
如果你认为有必要打赏我,请通过支付宝:**[email protected]**,不胜感激。

0 comments on commit d8da708

Please sign in to comment.