Coverage for nltk.compat : 88%
![](keybd_closed.png)
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding: utf-8 -*-
# Python 2/3 compatibility layer. Based on six.
return s.encode("latin-1") return s
install_opener, getproxies, HTTPPasswordMgrWithDefaultRealm, ProxyBasicAuthHandler, ProxyDigestAuthHandler)
else: return s return unicode(s, "unicode_escape")
except ImportError: from StringIO import StringIO
ProxyHandler, build_opener, install_opener, HTTPPasswordMgrWithDefaultRealm, ProxyBasicAuthHandler, ProxyDigestAuthHandler)
"""Return an iterator over the keys of a dictionary.""" return getattr(d, _iterkeys)()
"""Return an iterator over the values of a dictionary.""" return getattr(d, _itervalues)()
"""Return an iterator over the (key, value) pairs of a dictionary."""
"""Class decorator that fills in missing ordering methods""" '__lt__': [('__gt__', lambda self, other: not (self < other or self == other)), ('__le__', lambda self, other: self < other or self == other), ('__ge__', lambda self, other: not self < other)], '__le__': [('__ge__', lambda self, other: not self <= other or self == other), ('__lt__', lambda self, other: self <= other and not self == other), ('__gt__', lambda self, other: not self <= other)], '__gt__': [('__lt__', lambda self, other: not (self > other or self == other)), ('__ge__', lambda self, other: self > other or self == other), ('__le__', lambda self, other: not self > other)], '__ge__': [('__le__', lambda self, other: (not self >= other) or self == other), ('__gt__', lambda self, other: self >= other and not self == other), ('__lt__', lambda self, other: not self >= other)] } raise ValueError('must define at least one ordering operation: < > <= >=')
|