ChatCrawlersearch across public Telegram Open the app
P

Python

сообщение · 2025-08-29 09:34 UTC
A
x = Apple("Apple, "red", "Fuji", "X_place") y = Apple("Apple, "red", "Fuji", "Y_place") z = Apple("Apple, "red", "Fuji", "Z_place") n = Apple("Apple, "red", "new", "N_place") m = Apple("Apple, "red", "new", "M_place") You see, whenever I want to create an object of child class (Apple), I have to rewrite the first two arguments? Is it possible to somehow shorten it to something like this? Test = Fruit("Apple", "red") x = Apple(Test, "Fuji", "X_place") y = Apple(Test, "Fuji", "Y_place") z = Apple(Test, "Fuji", "Z_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