summaryrefslogtreecommitdiff
path: root/Lib/statistics.py
diff options
context:
space:
mode:
authorKushal Das <kushaldas@gmail.com>2016-06-04 16:21:13 -0700
committerKushal Das <kushaldas@gmail.com>2016-06-04 16:21:13 -0700
commit5801ecb4408cd11f6e6ffcb1612ca68d9936a728 (patch)
treed50a9aa79b55eb92dde2c12908d6ecb14fc7f1d5 /Lib/statistics.py
parent409482251b06fe75c4ee56e85ffbb4b23d934159 (diff)
downloadcpython-git-5801ecb4408cd11f6e6ffcb1612ca68d9936a728.tar.gz
Issue #25548: Showing memory address of class objects in repl
Diffstat (limited to 'Lib/statistics.py')
-rw-r--r--Lib/statistics.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/statistics.py b/Lib/statistics.py
index b081b5a006..63adc1a44f 100644
--- a/Lib/statistics.py
+++ b/Lib/statistics.py
@@ -131,23 +131,23 @@ def _sum(data, start=0):
--------
>>> _sum([3, 2.25, 4.5, -0.5, 1.0], 0.75)
- (<class 'float'>, Fraction(11, 1), 5)
+ (<class 'float' ...>, Fraction(11, 1), 5)
Some sources of round-off error will be avoided:
>>> _sum([1e50, 1, -1e50] * 1000) # Built-in sum returns zero.
- (<class 'float'>, Fraction(1000, 1), 3000)
+ (<class 'float' ...>, Fraction(1000, 1), 3000)
Fractions and Decimals are also supported:
>>> from fractions import Fraction as F
>>> _sum([F(2, 3), F(7, 5), F(1, 4), F(5, 6)])
- (<class 'fractions.Fraction'>, Fraction(63, 20), 4)
+ (<class 'fractions.Fraction' ...>, Fraction(63, 20), 4)
>>> from decimal import Decimal as D
>>> data = [D("0.1375"), D("0.2108"), D("0.3061"), D("0.0419")]
>>> _sum(data)
- (<class 'decimal.Decimal'>, Fraction(6963, 10000), 4)
+ (<class 'decimal.Decimal' ...>, Fraction(6963, 10000), 4)
Mixed types are currently treated as an error, except that int is
allowed.