ChatCrawlersearch across public Telegram Open the app
P

Python

сообщение · 2025-08-30 04:32 UTC
I
Replymessage unavailable
u can definite magic method called iter on Fruit, it returns iter((self.name, self.color)). Unpack it to Apple. class Fruit: def __init__(self, name, color): self.name = name self.color = color def __iter__(self): return iter((self.name, self.color)) class Apple(Fruit): def __init__(self, name, color, variety, region): super().__init__(name, color) self.variety = variety self.region = region def describe(): print(f"{self.name, self.color, self.variety, self.region} are correct.") x = Fruit("Apple", "red") y = Apple("Apple", "red", "Fuji", "X_place") z = Apple(*x, "Fuji", "X_place")

Вся лента · оригинал в 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