Searched refs:py_value (Results 1 – 4 of 4) sorted by relevance
/external/python/apitools/apitools/base/py/ |
D | extra_types.py | 117 def _PythonValueToJsonValue(py_value): argument 119 if py_value is None: 121 if isinstance(py_value, bool): 122 return JsonValue(boolean_value=py_value) 123 if isinstance(py_value, six.string_types): 124 return JsonValue(string_value=py_value) 125 if isinstance(py_value, numbers.Number): 126 if isinstance(py_value, six.integer_types): 127 if _MININT64 < py_value < _MAXINT64: 128 return JsonValue(integer_value=py_value) [all …]
|
D | extra_types_test.py | 42 def assertTranslations(self, py_value, json_proto): argument 44 py_value, extra_types._JsonProtoToPythonValue(json_proto)) 46 json_proto, extra_types._PythonValueToJsonProto(py_value))
|
/external/tensorflow/tensorflow/python/eager/ |
D | pywrap_tfe_src.cc | 122 bool fn_name(const string& key, PyObject* py_value, TF_Status* status, \ 124 if (check_fn(py_value)) { \ 125 *value = static_cast<type>(parse_fn(py_value)); \ 131 py_value->ob_type->tp_name) \ 147 bool ParseInt64Value(const string& key, PyObject* py_value, TF_Status* status, in PARSE_VALUE() 149 if (PyInt_Check(py_value)) { in PARSE_VALUE() 150 *value = static_cast<int64_t>(PyInt_AsLong(py_value)); in PARSE_VALUE() 152 } else if (PyLong_Check(py_value)) { in PARSE_VALUE() 153 *value = static_cast<int64_t>(PyLong_AsLong(py_value)); in PARSE_VALUE() 159 ", got ", py_value->ob_type->tp_name) in PARSE_VALUE() [all …]
|
/external/protobuf/python/google/protobuf/pyext/ |
D | message.cc | 1799 ScopedPyObjectPtr py_value(PyFloat_FromDouble(value)); in CheckAndGetInteger() local 1800 if (!py_value.get()) { in CheckAndGetInteger() 1804 ScopedPyObjectPtr py_str(PyObject_Str(py_value.get())); in CheckAndGetInteger()
|