Karthikeyan Singaravelan <[email protected]> added the comment:
Is this about sum not accepting start as keyword argument? It's fixed with
issue34637. The help function in the report is that start could only be a
positional argument with start appearing before '/' in "sum(iterable, start=0,
/)" . This has been changed in 3.8 to below signature.
sum(iterable, /, start=0)
Return the sum of a 'start' value (default: 0) plus an iterable of numbers
When the iterable is empty, return the start value.
This function is intended specifically for use with numeric values and may
reject non-numeric types.
$ python3.7
Python 3.7.1rc2 (v3.7.1rc2:6c06ef7dc3, Oct 13 2018, 05:10:29)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> sum(range(10), start=10)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: sum() takes no keyword arguments
# 3.8
$ ./python.exe
Python 3.8.0a3+ (heads/master:7444daada1, Mar 30 2019, 20:27:47)
[Clang 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> sum(range(10), start=10)
55
----------
nosy: +rhettinger, xtreak
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36491>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com