From 4fa8e0ec245b1e0c5a16e77692012923782878c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= <sornjure@gmail.com> Date: Sun, 8 Sep 2019 01:10:46 +0200 Subject: [PATCH] Numbers --- README.md | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5ac2a5f..42dc8e1 100644 --- a/README.md +++ b/README.md @@ -483,7 +483,7 @@ Numbers <float> = float(<int/str/bool>) <complex> = complex(real=0, imag=0) # Or: <real> + <real>j <Fraction> = fractions.Fraction(numerator=0, denominator=1) -<Decimal> = decimal.Decimal(<int/float/str>) +<Decimal> = decimal.Decimal(<str/int/float>) ``` * **`'int(<str>)'` and `'float(<str>)'` raise ValueError on malformed strings.** * **Decimal numbers can be represented exactly, unlike floats where `'1.1 + 2.2 != 3.3'`.** diff --git a/index.html b/index.html index cf92422..9a0f219 100644 --- a/index.html +++ b/index.html @@ -560,7 +560,7 @@ to_exclusive = <range>.stop <float> = float(<int/str/bool>) <complex> = complex(real=<span class="hljs-number">0</span>, imag=<span class="hljs-number">0</span>) <span class="hljs-comment"># Or: <real> + <real>j</span> <Fraction> = fractions.Fraction(numerator=<span class="hljs-number">0</span>, denominator=<span class="hljs-number">1</span>) -<Decimal> = decimal.Decimal(<int/float/str>) +<Decimal> = decimal.Decimal(<str/int/float>) </code></pre></div></div>