From 5801ecb4408cd11f6e6ffcb1612ca68d9936a728 Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Sat, 4 Jun 2016 16:21:13 -0700 Subject: Issue #25548: Showing memory address of class objects in repl --- Lib/statistics.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Lib/statistics.py') 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) - (, Fraction(11, 1), 5) + (, Fraction(11, 1), 5) Some sources of round-off error will be avoided: >>> _sum([1e50, 1, -1e50] * 1000) # Built-in sum returns zero. - (, Fraction(1000, 1), 3000) + (, 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)]) - (, Fraction(63, 20), 4) + (, 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) - (, Fraction(6963, 10000), 4) + (, Fraction(6963, 10000), 4) Mixed types are currently treated as an error, except that int is allowed. -- cgit v1.2.1