Skip to content

Instantly share code, notes, and snippets.

@px-amaac
Created December 11, 2013 19:19
Show Gist options
  • Save px-amaac/7916626 to your computer and use it in GitHub Desktop.
Save px-amaac/7916626 to your computer and use it in GitHub Desktop.
from Materials import Materials
class Book(Materials):
def __init__(self, d):
super().__init__(d[0], d[1], d[2], d[9])
d.pop(9)
for i in range(3):
d.pop(0)
self.data = d
def __str__(self):
return "Author: " + self.data[0] + '\n'
+ "Description: " + self.data[1] + '\n'
+ "Publisher: " + self.data[2] + '\n'
+ "City: " + self.data[3] + '\n'
+ "Year: " + self.data[4] + '\n'
+ "Series: " + self.data[5] + '\n'
+ "Type: Book\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment