ChatCrawlersearch across public Telegram Open the app
P

Python

сообщение · 2025-09-20 17:04 UTC
N
hi class Questions: def __init__(self, question: str, correct_answer: str, answers: list[str]): question.self = question correct_answer.self = correct_answer answers.self = answers def __dict__(self): <seems like I should put sth here> def indexing(self): pass Questions("where?", "1", ["1. up", "2. down", "3. left", "4. right"]) I have no idea why cant I put a list as an attribute it gives me this error: question.self = question ^^^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'self' and no __dict__ for setting new attributes I have no idea what that dict is, asked some language models, some said I should add it, some said I shouldnt, all I need to do is to put a list as the third attribute so I can start working on other parts of the program

Вся лента · оригинал в Telegram

Open in Telegram Каталог площадок Искать в ChatCrawler

A snapshot of an open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog