This commit is contained in:
blueloveTH 2023-05-16 12:38:53 +08:00
parent 6ee43311ea
commit 6416c58b85
2 changed files with 2 additions and 4 deletions

View File

@ -36,9 +36,9 @@ Return the floor of `x` as a float, the largest integer value less than or equal
Return an accurate floating point sum of values in the iterable. Avoids loss of precision by tracking multiple intermediate partial sums: Return an accurate floating point sum of values in the iterable. Avoids loss of precision by tracking multiple intermediate partial sums:
``` ```
>>> sum([.1, .1, .1, .1, .1, .1, .1, .1, .1, .1]) >>> sum([0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1])
0.9999999999999999 0.9999999999999999
>>> fsum([.1, .1, .1, .1, .1, .1, .1, .1, .1, .1]) >>> fsum([0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1])
1.0 1.0
``` ```

View File

@ -185,8 +185,6 @@ class property:
def __init__(self, fget, fset=None): def __init__(self, fget, fset=None):
self.fget = fget self.fget = fget
self.fset = fset self.fset = fset
if hasattr(fget, '__doc__'):
self.__doc__ = fget.__doc__
def __get__(self, obj): def __get__(self, obj):
return self.fget(obj) return self.fget(obj)