def __init__(self, lesson_number, extra=False): self.extra = extra self.lesson_number = lesson_number self.book_number = Book.book_number(lesson_number) self.words = ReaderLesson(self.book_number, lesson_number, extra).generate_words() self.max_lenghts = [max([word.pinyin_l for word in self.words]), max([word.chinese_l for word in self.words])]
def __init__(self, lesson_number, extra=False): self.extra = extra self.lesson_number = lesson_number self.book_number = Book.book_number(lesson_number) self.words = ReaderLesson(self.book_number, lesson_number, extra).generate_words()