mirror of https://github.com/flaggo/pydu.git
add doc for urlib, urljoin and cmp
This commit is contained in:
parent
95b8480778
commit
4f9b8565f9
|
@ -6,6 +6,16 @@ Compat
|
|||
Specify current Python interpreter is Python 2 or 3.
|
||||
|
||||
|
||||
.. py:function:: pydu.compat.urlib(base, url, allow_fragments=True)
|
||||
|
||||
Same to ``urllib`` on PY2 or ``urllib.request`` on PY3.
|
||||
|
||||
|
||||
.. py:function:: pydu.compat.urlparse(base, url, allow_fragments=True)
|
||||
|
||||
Same to ``urlparse`` on PY2 or ``urllib.parse`` on PY3.
|
||||
|
||||
|
||||
.. py:function:: pydu.compat.urljoin(base, url, allow_fragments=True)
|
||||
|
||||
Same to ``urlparse.urljoin`` on PY2 or ``urllib.parse.urljoin`` on PY3.
|
||||
|
@ -46,6 +56,11 @@ Compat
|
|||
Same to ``itertools.imap`` on PY2 or ``map`` on PY3.
|
||||
|
||||
|
||||
.. py:function:: pydu.compat.cmp
|
||||
|
||||
Same to ``cmp`` on PY2, but implement on PY3.
|
||||
|
||||
|
||||
.. py:function:: pydu.compat.has_next_attr(x)
|
||||
|
||||
An implementation independent way of checking for next attribute.
|
||||
|
|
Loading…
Reference in New Issue