- Sort Score
- Num 10 results
- Language All
Results 1 - 9 of 9 for DECIMAL (0.1 seconds)
-
tests/test_jsonable_encoder.py
def test_decimal_encoder_float(): data = {"value": Decimal(1.23)} assert jsonable_encoder(data) == {"value": 1.23} def test_decimal_encoder_int(): data = {"value": Decimal(2)} assert jsonable_encoder(data) == {"value": 2} def test_decimal_encoder_nan(): data = {"value": Decimal("NaN")} assert isnan(jsonable_encoder(data)["value"])
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 9.2K bytes - Click Count (0) -
tests/test_multi_body_errors.py
from decimal import Decimal from dirty_equals import IsOneOf from fastapi import FastAPI from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel, condecimal app = FastAPI() class Item(BaseModel): name: str age: condecimal(gt=Decimal(0.0)) # type: ignore @app.post("/items/") def save_item_no_body(item: list[Item]): return {"item": item}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 6.1K bytes - Click Count (0) -
fastapi/encoders.py
results in failed round-tripping between encode and parse. Our Id type is a prime example of this. >>> decimal_encoder(Decimal("1.0")) 1.0 >>> decimal_encoder(Decimal("1")) 1 >>> decimal_encoder(Decimal("NaN")) nan """ exponent = dec_value.as_tuple().exponent if isinstance(exponent, int) and exponent >= 0: return int(dec_value) else: return float(dec_value)Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 10.7K bytes - Click Count (0) -
docs/es/docs/tutorial/extra-data-types.md
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Dec 16 16:33:45 GMT 2025 - 2.9K bytes - Click Count (0) -
fastapi/param_functions.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 63K bytes - Click Count (0) -
doc/go_spec.html
<p> A floating-point literal is a decimal or hexadecimal representation of a <a href="#Constants">floating-point constant</a>. </p> <p> A decimal floating-point literal consists of an integer part (decimal digits), a decimal point, a fractional part (decimal digits), and an exponent part (<code>e</code> or <code>E</code> followed by an optional sign and decimal digits).
Created: Tue Dec 30 11:13:12 GMT 2025 - Last Modified: Tue Dec 02 23:07:19 GMT 2025 - 286.5K bytes - Click Count (1) -
src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java
* comment: Boost value for title field in queries. * @return The value of found property. (NotNull: if not found, exception but basically no way) * @throws NumberFormatException When the property is not decimal. */ java.math.BigDecimal getQueryBoostTitleAsDecimal(); /** * Get the value for the key 'query.boost.title.lang'. <br> * The value is, e.g. 1.0 <br>Created: Sat Dec 20 09:19:18 GMT 2025 - Last Modified: Sat Dec 13 02:21:17 GMT 2025 - 525.7K bytes - Click Count (2) -
docs/en/docs/release-notes.md
### Fixes * 🐛 Avoid accessing non-existing "$ref" key for Pydantic v2 compat remapping. PR [#14361](https://github.com/fastapi/fastapi/pull/14361) by [@svlandeg](https://github.com/svlandeg). * 🐛 Fix `TypeError` when encoding a decimal with a `NaN` or `Infinity` value. PR [#12935](https://github.com/fastapi/fastapi/pull/12935) by [@kentwelcome](https://github.com/kentwelcome). ### Internal
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 19:06:15 GMT 2025 - 586.7K bytes - Click Count (0) -
lib/fips140/v1.1.0-rc1.zip
bits.UintSize; i += 8 { if len(buf) >= cap(buf) { break } buf = append(buf, byte(word)) word >>= 8 } } v.SetBytes(buf[:32]) return v } func (v *Element) fromDecimal(s string) *Element { n, ok := new(big.Int).SetString(s, 10) if !ok { panic("not a valid decimal: " + s) } return v.fromBig(n) } // toBig returns v as a big.Int. func (v *Element) toBig() *big.Int { buf := v.Bytes() words := make([]big.Word, 32*8/bits.UintSize) for n := range words { for i := 0; i < bits.UintSize; i += 8 { if len(buf) == 0 {...Created: Tue Dec 30 11:13:12 GMT 2025 - Last Modified: Thu Dec 11 16:27:41 GMT 2025 - 663K bytes - Click Count (0)