This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients mark.dickinson, oscarbenjamin, rhettinger, tim.peters
Date 2013-09-30.18:33:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The possible use cases are so varied & fuzzy it seems better to use an object for this, rather than funk-ify `fsum`.  Say, class Summer.  Then methods could be invented as needed, with whatever state is required belonging to Summer objects rather than passed around in funky calling-sequence/return conventions.  Like,

s = Summer() # new object
s.add(3.1)   # add one number to running sum
s.sum()      # returns sum so far as float: 3.1
s.update(iterable_returning_numbers)  # add a bunch of numbers to sum
s.combine(another_Summer_object)  # add Summer's
s.sum_as_decimal(precision=None) # sum so far as Decimal
s.sum_as_fraction()  # exact sum so far as Fraction

Blah blah blah ;-)
Date User Action Args
2013-09-30 18:33:58tim.peterssetrecipients: + tim.peters, rhettinger, mark.dickinson, oscarbenjamin
2013-09-30 18:33:58tim.peterssetmessageid: <>
2013-09-30 18:33:58tim.peterslinkissue19086 messages
2013-09-30 18:33:58tim.peterscreate