ChatCrawlersearch across public Telegram Open the app
P

Python

сообщение · 2025-08-29 09:25 UTC
A
Replymessage unavailable
I know they must be defined, I'm saying how can I pass an existing object as argument to a class's init without rewriting again and again. for example we have a class named Fruits that its init has 10 parameters, you can create objects with it like apple, banana, pineapple and whatever. Now whenever I want to use that class in a child's class, I literally have to redefine all those parameters again. so I thought maybe there is a way, like making an object, then passing it to another object as argument, so next time I would create an object, I don't need to redefine all the parameters. for example turning this: z = Apple("Apple, "red", "Fuji", "X_place") into the ---> 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