Jezzy Grey

Generation

class from descriptionSun, 19 Feb 2023

The views class for the django framework. Create several classes that implement the task of tearing text in two forms

class Task: def __init__(self, text, maxlength=10, words=False): self.words = words self.maxlength = maxlength self.text = text class TaskWithWrap(Task): def __init__(self, text, maxlength=10): super(TaskWithWrap, self).__init__(text, maxlength, words=False) class TaskWithWords(Task): def __init__(self, text, maxlength=10): super(TaskWithWords, self).__init__(text, maxlength, words=True)

Questions about programming?Chat with your personal AI assistant