Did I find the right examples for you? yes no

All Samples(30)  |  Call(28)  |  Derive(0)  |  Import(2)
    

        def tryelse(func, default='', exception=Exception, log=False):
    """
    """
    try:
        return func()
    except exception as e:
        if log:
            print e
        return default
        


src/g/l/glassdoor-0.0.8/glassdoor/gd.py   glassdoor(Download)
from functools import partial
from BeautifulSoup import BeautifulSoup
from utils import intify, tryelse
 
GLASSDOOR_API = 'http://www.glassdoor.com'
        return [intify(size.text) for size in sizes]
 
    data['connections'] = tryelse(partial(_connections, soup), default=0)
    data['website'] = tryelse(partial(_website, soup), default='')
    data['name'] = tryelse(partial(_name, soup), default='')
    data['location'] = tryelse(partial(_location, soup), default='')

src/g/l/glassdoor-HEAD/glassdoor/gd.py   glassdoor(Download)
from functools import partial
from BeautifulSoup import BeautifulSoup
from utils import intify, tryelse
 
GLASSDOOR_API = 'http://www.glassdoor.com'
        return [intify(size.text) for size in sizes]
 
    data['connections'] = tryelse(partial(_connections, soup), default=0)
    data['website'] = tryelse(partial(_website, soup), default='')
    data['name'] = tryelse(partial(_name, soup), default='')
    data['location'] = tryelse(partial(_location, soup), default='')