Converts the stashed function name and errno value to a human-readable string.
We do this here rather than in the constructor so that callers only pay for
this if they need it.
768303
@Override public String getMessage() {
    String errnoName = OsConstants.errnoName(errno);
    if (errnoName == null) {
      errnoName = "errno " + errno;
    }
    String description = Libcore.os.strerror(errno);
    return functionName + " failed: " + errnoName + " (" + description + ")";
  }
895508
def strip_errors(obj):
    
    rtn_obj = copy.deepcopy(obj)
    try:
        del rtn_obj["__error_keys__"]
    except KeyError:
        pass
    for key in obj.get('__error_keys__', []):
        rtn_obj[key] = rtn_obj[key]['value']
    return rtn_obj
639356
def __str_cleanup(line):
        
        if '#' in line:
            line = line.replace("#", "")
            line = line.strip()
        if '-----------' in line:
            line = ''
        return line
1046546
def to_str(value):
    '''
    
    '''
    value = from_str(value)

    if value:
        value = value.replace('"', '\\"')
        if ' ' in value:
            value = '"' + value + '"'
    elif value is None:
        value = 'none'

    return value
63546
private String createString(String f)
    {
        return
            "func="+func+f+
            "gridDimX="+gridDimX+f+
            "gridDimY="+gridDimY+f+
            "gridDimZ="+gridDimZ+f+
            "blockDimX="+blockDimX+f+
            "blockDimY="+blockDimY+f+
            "blockDimZ="+blockDimZ+f+
            "sharedMemBytes="+sharedMemBytes+f+
            "kernelParams="+kernelParams+f+
            "extra="+extra;
    }
1041770
def stringify(*args):
    
    if (len(args) == 1) and callable(args[0]):
        func = args[0]

        @wraps(func)
        def _inner(*args, **kwargs):
            return "".join([str(i) for i in func(*args, **kwargs)])
        return _inner
    else:
        return "".join([str(i) for i in args])
611082
def to_str(cls, values, callback=None):
        
        if callback and callable(callback):
            if isinstance(values, dict):
                return callback(_es.to_str(values))

            return [callback(_es.to_str(i)) for i in values]
        return _es.to_str(values)
1001900
function getObjectToStringValue(value) {
            var result = objectToString.call(value);
            switch (result) {
                case '[object Undefined]':
                    return '#Undefined';
                case '[object Null]':
                    return '#Null';
                case '[object Object]':
                    return 'Object';
                case '[object Function]':
                    return 'Function';
                case '[object String]':
                    return 'String';
                case '[object Number]':
                    return (value != +value) ? '#NaN' : 'Number';
                case '[object Array]':
                    return 'Array';
                case '[object Boolean]':
                    return 'Boolean';
                case '[object RegExp]':
                    return 'RegExp';
                case '[object Symbol]':
                    return 'Symbol';
                case '[object Map]':
                    return 'Map';
                case '[object WeakMap]':
                    return 'WeakMap';
                case '[object Set]':
                    return 'Set';
                case '[object WeakSet]':
                    return 'WeakSet';
                case '[object Int8Array]':
                    return 'Int8Array';
                case '[object Uint8Array]':
                    return 'Uint8Array';
                case '[object Uint8ClampedArray]':
                    return 'Uint8ClampedArray';
                case '[object Int16Array]':
                    return 'Int16Array';
                case '[object Uint16Array]':
                    return 'Uint16Array';
                case '[object Int32Array]':
                    return 'Int32Array';
                case '[object Uint32Array]':
                    return 'Uint32Array';
                case '[object Float32Array]':
                    return 'Float32Array';
                case '[object Float64Array]':
                    return 'Float64Array';
                case '[object ArrayBuffer]':
                    return 'ArrayBuffer';
                case '[object DataView]':
                    return 'DataView';
                case '[object Error]':
                    return 'Error';
                case '[object Arguments]':
                    return 'Arguments';
                case '[object JSON]':
                    return 'JSON';
                case '[object Math]':
                    return 'Math';
                case '[object Date]':
                    return 'Date';
                default: //handle the rest (HTML element, future global objects,...)
                    return result.slice(8, -1);
            }
        }
1303740
def convert_to_str(input_string):

    

    if sys.version < '3':

        if isinstance(input_string, str) \
                or isinstance(input_string, unicode):  # pragma: no cover py3

            return input_string  # pragma: no cover py3

    else:

        if isinstance(input_string, str):  # pragma: no cover py3

            return input_string  # pragma: no cover py3

    return str(input_string)
795986
def function_to_serializable_representation(fn):
    
    if type(fn) not in (FunctionType, BuiltinFunctionType):
        raise ValueError(
            "Can't serialize %s : %s, must be globally defined function" % (
                fn, type(fn),))

    if hasattr(fn, "__closure__") and fn.__closure__ is not None:
        raise ValueError("No serializable representation for closure %s" % (fn,))

    return {"__module__": get_module_name(fn), "__name__": fn.__name__}
1077886
private String safeToString(Object obj)
	{
		String toString = null;
		if (obj != null)
		{
		    try
		    {
		        toString = obj.toString();
		    }
		    catch (Throwable ex)
		    {
		        toString = "BAD toString() impl for " + obj.getClass().getName();
		    }
		}
		return toString;
	}
337674
def clean_fail(func):
    '''
    
    '''
    def func_wrapper(*args, **kwargs):
        try:
            return func(*args, **kwargs)
        except botocore.exceptions.ClientError as e:
            print(str(e), file=sys.stderr)
            sys.exit(1)
    return func_wrapper
823763
public static final Function<Short,String> toCurrencyStr() {
        return (Function<Short,String>)((Function)FnNumber.toCurrencyStr());
    }
1253250
public static final Function<Long,String> toCurrencyStr() {
        return (Function<Long,String>)((Function)FnNumber.toCurrencyStr());
    }
533576
def safestr(str_):
    '''  '''
    str_ = str_ or ""
    return "".join(x for x in str_ if x.isalnum())
503962
function funcToString(func) {
        var str = func.toString();
        return str.slice(str.indexOf('{') + 1, str.lastIndexOf('}'));
    }
964771
def decompile_func(func):
    '''
    
    '''
    code = func.__code__

    # For python 3
#    defaults = func.func_defaults if sys.version_info.major < 3 else func.__defaults__
#    if defaults:
#        default_names = code.co_varnames[:code.co_argcount][-len(defaults):]
#    else:
#        default_names = []
#    defaults = [_ast.Name(id='%s_default' % name, ctx=_ast.Load() , lineno=0, col_offset=0) for name in default_names]
    ast_node = make_function(code, defaults=[], lineno=code.co_firstlineno)

    return ast_node