Did I find the right examples for you? yes no

All Samples(2065)  |  Call(1717)  |  Derive(348)  |  Import(0)
Base class for lookup errors.

src/p/y/pyjs-HEAD/examples/libtest/ExceptionTest.py   pyjs(Download)
    def testBuiltInException(self):
        try:
            raise LookupError('hoschi')
        except LookupError, err:
            self.assertEqual(err.__class__.__name__, 'LookupError')
        self.assertEqual(repr(e), "StandardError('test',)")
 
        e = LookupError(*args)
        self.assertEqual(str(e), args[0])
        self.assertEqual(repr(e), "LookupError('test',)")
        raise_errors = [KeyError('KeyError'), TypeError('TypeError'),
                        AttributeError('AttributeError'),
                        LookupError('LookupError')]
        raised_errors = []
        for err in raise_errors:

src/d/j/django-admin-report-HEAD/example/lib/sx/w3c/css.py   django-admin-report(Download)
            return default
        else:
            raise LookupError("Could not find style for '%s' in %r" % (attrName, rule))
 
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/d/j/django-admin-report-HEAD/example/lib/sx/pisa3/pisa_parser.py   django-admin-report(Download)
            return default
        else:
            raise LookupError("Could not find inherited CSS attribute value for '%s'" % (attrName,))
 
    if result is not None:

src/g/a/gae-twitter-oauth-example-HEAD/werkzeug/routing.py   gae-twitter-oauth-example(Download)
    """
    if not name in map.converters:
        raise LookupError('the converter %r does not exist' % name)
    if args:
        storage = type('_Storage', (), {'__getitem__': lambda s, x: x})()
class BuildError(RoutingException, LookupError):
    """Raised if the build system cannot find a URL for an endpoint with the
    values provided.
    """
 

src/g/a/gae-twitter-oauth-example-HEAD/werkzeug/exceptions.py   gae-twitter-oauth-example(Download)
    def __call__(self, code, *args, **kwargs):
        if not args and not kwargs and not isinstance(code, (int, long)):
            raise _ProxyException(code)
        if code not in self.mapping:
            raise LookupError('no exception for %r' % code)

src/p/y/python_science_apps-HEAD/code_samples/model.py   python_science_apps(Download)
def production_by_state(state_abbr):
    """Get production by state"""
 
    if state_abbr not in STATES:
        raise LookupError('Invalid state abbreviation "%s" (%s)' % (state_abbr,

src/g/a/gae-twitter-oauth-example-HEAD/werkzeug/contrib/kickstart.py   gae-twitter-oauth-example(Download)
class TemplateNotFound(IOError, LookupError):
    """
    A template was not found by the template loader.
    """
 

src/g/a/gae-twitter-oauth-example-HEAD/jinja2/exceptions.py   gae-twitter-oauth-example(Download)
class TemplateNotFound(IOError, LookupError, TemplateError):
    """Raised if a template does not exist."""
 
    # looks weird, but removes the warning descriptor that just
    # bogusly warns us about message being deprecated

src/w/e/webapp2_example-HEAD/lib/jinja2/exceptions.py   webapp2_example(Download)
class TemplateNotFound(IOError, LookupError, TemplateError):
    """Raised if a template does not exist."""
 
    # looks weird, but removes the warning descriptor that just
    # bogusly warns us about message being deprecated

src/m/e/mercurial-2.9.1/mercurial/dagutil.py   Mercurial(Download)
    def _internalize(self, id):
        ix = self._revlog.rev(id)
        if ix == nullrev:
            raise LookupError(id, self._revlog.indexfile, _('nullid'))
        return ix

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next