diff --git a/docs/compat.rst b/docs/compat.rst index 8d4ee60..54c3cb2 100644 --- a/docs/compat.rst +++ b/docs/compat.rst @@ -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.