Handling ISBN-13

class pyisbn.Isbn13(isbn)[source]

Class for representing ISBN-13 objects.

See also

Isbn

Initialise a new Isbn13 object.

Parameters:

isbn (TIsbn13 (TIsbn (str))) – ISBN-13 string

calculate_checksum()[source]

Calculate ISBN-13 checksum.

Return type:

str

Returns:

ISBN-13 checksum value

convert(_code='978')[source]

Convert ISBN-13 to ISBN-10.

Parameters:

_code (str) – Ignored, only for compatibility with Isbn

Return type:

str

Returns:

ISBN-10 string

Raises:

ValueError – When ISBN-13 isn’t a Bookland “978” ISBN