From 402a0d57dddce84cdfd9d37d4699eeaf4ed352d0 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sun, 12 Feb 2012 22:09:29 +0000 Subject: use the luhn module where possible git-svn-id: http://arthurdejong.org/svn/python-stdnum/python-stdnum@126 9dea7c4f-944c-4273-ac1a-574ede026edc --- stdnum/util.py | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'stdnum/util.py') diff --git a/stdnum/util.py b/stdnum/util.py index b22c2aa..199eea1 100644 --- a/stdnum/util.py +++ b/stdnum/util.py @@ -27,13 +27,3 @@ def clean(number, deletechars): '123456789' """ return ''.join(x for x in number if x not in deletechars) - - -def digitsum(numbers): - """Returns the sum of the individual digits of the provided numbers. - - >>> digitsum([12, 55]) - 13 - """ - # note: this only works for two-digit numbers - return sum((x // 10) + (x % 10) for x in numbers) -- cgit v1.2.3