ValueError: cannot switch from manual field specification to automatic field numbering
The class: class Book(object): def __init__(self, title, author): self.title = title self.author = author def get_entry(self): return "{0} by {1} on {}".format(self.title, self.author, self.press) Create an instance of my book from it: In [72]: mybook = Book('HTML','Lee') In [75]: mybook.title Out[75]: 'HTML' In [76]: mybook.author Out[76]: 'Lee' Please notice that I didn't initialize attribute 'self.press',while use it in the get_entry method.Go ahead to type in data. mybook.press = 'Murach' mybook.price = 'download' Till now, I can specify all the data input with vars In [77]: vars(mybook)