Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)
int(x=0) -> int or long
int(x, base=10) -> int or long

Convert a number or string to an integer, or return 0 if no arguments
are given.  If x is floating point, the conversion truncates towards zero.
If x is outside the integer range, the function returns a long instead.

If x is not a number or if base is given, then x must be a string or
Unicode object representing an integer literal in the given base.  The
literal can be preceded by '+' or '-' and be surrounded by whitespace.(more...)

src/g/o/gourd-0.2.18/gourd/gourd_sync.py   gourd(Download)
        error = 'parse raw_data fail. e: %s, raw_data: %s' % (e, request.raw_data)
        request.server.logger.error(error)
        return request.server.make_rsp(ret=constants.RET_SYSTEM, error=error)
 
    if not isinstance(request.json_data, dict):
        error = 'json_data is not dict. json_data: %s' % request.json_data
        request.server.logger.error(error)
        return request.server.make_rsp(ret=constants.RET_SYSTEM, error=error)
        error = 'endpoint is not in json_data. json_data: %s' % request.json_data
        request.server.logger.error(error)
        return request.server.make_rsp(ret=constants.RET_SYSTEM, error=error)
 
    endpoint = request.json_data['endpoint']
    view_func = request.server.get_route_view_func(endpoint)
    if not view_func:
        error = 'endpoint is not valid. endpoint: %s' % endpoint
        request.server.logger.error(error)
        return request.server.make_rsp(ret=constants.RET_SYSTEM, error=error)
        request.server.logger.error(error)
        view_func_exc = e
        view_func_result = request.server.make_rsp(ret=constants.RET_SYSTEM,
                                                   error=error if request.server.debug else constants.ERROR_INTERNAL)
 

src/g/o/gourd-0.2.18/gourd/gourd.py   gourd(Download)
        error = 'parse raw_data fail. e: %s, raw_data: %s' % (e, request.raw_data)
        request.server.logger.error(error)
        request.push(request.server.make_rsp(ret=constants.RET_SYSTEM, error=error))
        request.close()
        return None
 
    if not isinstance(request.json_data, dict):
        error = 'json_data is not dict. json_data: %s' % request.json_data
        request.server.logger.error(error)
        request.push(request.server.make_rsp(ret=constants.RET_SYSTEM, error=error))
        error = 'endpoint is not in json_data. json_data: %s' % request.json_data
        request.server.logger.error(error)
        request.push(request.server.make_rsp(ret=constants.RET_SYSTEM, error=error))
        request.close()
        return None
        error = 'endpoint is not valid. endpoint: %s' % endpoint
        request.server.logger.error(error)
        request.push(request.server.make_rsp(ret=constants.RET_SYSTEM, error=error))
        request.close()
        return None
        request.server.logger.error(error)
        view_func_exc = e
        request.push(request.server.make_rsp(ret=constants.RET_SYSTEM,
                                             error=error if request.server.debug else constants.ERROR_INTERNAL))