Skip to content

Commit

Permalink
add 'Isbn' class
Browse files Browse the repository at this point in the history
  • Loading branch information
xlcnd committed Jun 2, 2020
1 parent 9a86149 commit 43433bd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions isbnlib/_isbn.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,12 @@ def __init__(self, isbnlike):
self.doi = doi(self.ean13)
self.info = info(self.ean13)
self.issued = len(mask(self.ean13)) > 0

def __getattr__(self, attr):
return self[attr]

def __str__(self):
return str(vars(self))

def __repr__(self):
return self.__str__()

0 comments on commit 43433bd

Please sign in to comment.