Skip to main content

python_decimal_parse

Function python_decimal_parse 

Source
pub fn python_decimal_parse(s: &str) -> Result<ParsedNumber>
Expand description

Python’s Decimal(str) constructor.

Grammar (case-insensitive, surrounding whitespace stripped): sign? ( digits ‘.’ digits? | ‘.’ digits | digits ) (‘e’ sign? digits)? sign? (‘inf’ | ‘infinity’) sign? (‘nan’ | ‘snan’) digits? PEP 515: ‘_’ allowed only between two digits.