Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
Removing the assertion and implementing Steven's idea seems like the best way to go: sum((y:=(x-c)) * y for x in data) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39218> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com