Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/stdnum/isbn.py
diff options
context:
space:
mode:
Diffstat (limited to 'stdnum/isbn.py')
-rw-r--r--stdnum/isbn.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/stdnum/isbn.py b/stdnum/isbn.py
index 6bd5b79..0eee01e 100644
--- a/stdnum/isbn.py
+++ b/stdnum/isbn.py
@@ -17,9 +17,11 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 USA
-"""Module for handling ISBNs (International Standard Book Number). This
-module handles both numbers in ISBN-10 (10-digit) and ISBN-13 (13-digit)
-format.
+"""ISBN (International Standard Book Number).
+
+The ISBN is the International Standard Book Number, used to identify
+publications. This module supports both numbers in ISBN-10 (10-digit) and
+ISBN-13 (13-digit) format.
>>> is_valid('978-9024538270')
True
@@ -85,8 +87,6 @@ def isbn_type(number):
if ean.calc_check_digit(number[:-1]) != number[-1]:
return None
return 'ISBN13'
- else:
- return None
def is_valid(number):
@@ -115,7 +115,7 @@ def to_isbn13(number):
def to_isbn10(number):
- """Convert the number to ISBN-13 format."""
+ """Convert the number to ISBN-10 format."""
number = number.strip()
min_number = compact(number)
if len(min_number) == 10: