Files
deb-python-pecan/pecan/compat/__init__.py
Ryan Petrello 861f1bdecc Squeeze some more performance out of the WSGI __call__ and dispatch algorithm.
Change-Id: I3e25381d526866d6feae05f0dcbdca5707f86df7
2013-09-25 01:21:31 -04:00

21 lines
517 B
Python

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