File: __init__.py

package info (click to toggle)
python-pecan 0.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,372 kB
  • ctags: 1,832
  • sloc: python: 9,048; makefile: 144; sh: 85
file content (20 lines) | stat: -rw-r--r-- 517 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import inspect

import six

if six.PY3:
    import urllib.parse as urlparse
    from urllib.parse import quote, unquote_plus
    from urllib.request import urlopen, URLError
    from html import escape
    izip = zip
else:
    import urlparse  # noqa
    from urllib import quote, unquote_plus  # noqa
    from urllib2 import urlopen, URLError  # noqa
    from cgi import escape  # noqa
    from itertools import izip


def is_bound_method(ob):
    return inspect.ismethod(ob) and six.get_method_self(ob) is not None