PY-21692 Fixed: Return type of sum(List[Decimal]) is 'Any' (should be 'Decimal')

Add skeletons for builtin sum function
This commit is contained in:
Semyon Proshev
2016-11-29 15:16:08 +03:00
parent 60edb30580
commit e3f371128b
4 changed files with 32 additions and 0 deletions

View File

@@ -229,6 +229,16 @@ def max(*args, key=None, default=None):
pass
def sum(iterable, start=0):
"""Sums start and the items of an iterable from left to right and returns
the total.
:type iterable: collections.Iterable[T]
:rtype: T
"""
pass
def next(iterator, default=None):
"""Return the next item from the iterator.

View File

@@ -232,6 +232,16 @@ def max(*args, key=None, default=None):
pass
def sum(iterable, start=0):
"""Sums start and the items of an iterable from left to right and returns
the total.
:type iterable: collections.Iterable[T]
:rtype: T
"""
pass
def next(iterator, default=None):
"""Return the next item from the iterator.