TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #205 · 22 јан.

Как работает функция reload()? Эта функция нужна для того, чтобы перезагрузить изменившийся код из py-файла без рестарта интерпретатора. Дело в том, что любой импортированный модуль при повторном импорте не будет перечитывать файл. Функция импорта вернёт уже загруженный в память объект модуля. Чтобы обновить код, нужно либо перезапустить всю программу, либо использовать функцию reload() from importlib import reload reload(my_module) 🔸 Функция reload() принимает в качестве аргумента только объект модуля или пакета. Она не может перезагрузить класс или функцию. Только весь файл целиком! 🔸 Перезагрузка пакета перезагрузит только его файл __init__.py, если он есть. Но не вложенные модули. 🔸Она не может перезагрузить ранее не импортированный модуль. 🔸При вызове функция reload() перечитывает и перекомпилирует код в файле, создавая новые объекты. После создания новых объектов перезаписывается ранее созданный неймспейс этого модуля. Это значит, что если где-то этот модуль импортирован через import и обращение к атрибутам происходит через неймспейс (имя) модуля, то такие атрибуты обновятся. Если какие-либо объекты из этого модуля импортированы через from то они будут ссылаться на старые объекты. Напишем простой модуль # mymodule.py x = 1 Теперь импортируем модуль и отдельно переменную х из модуля >>> import mymodule >>> from mymodule import x >>> print(mymodule.x) 1 >>> print(x) 1 Не перезапуская интерпретатор вносим изменения в модуль # mymodule.py x = 2 Делаем перезагрузку модуля и проверяем х ещё раз >>> reload(mymodule) >>> print(mymodule.x) 2 >>> print(x) 1 То же самое будет если присвоить любой объект переменной (даже словарь или список) Повторный импорт обновляет значение >>> from mymodule import x >>> print(x) 2 🔸Созданные инстансы классов не обновятся после перезагрузки модуля. Их придётся пересоздать. #tricks#basic

Резултати

Пронајдени 19 слични објави

Пребарај: #bulcoin

当前筛选 #bulcoin清除筛选
BLC Market - mini-app BulCoin

@bulcoin_blc · Post #258 · 23.02.2026 г., 17:00

If you're just considering BulCoin — here's what you can do right now: 1️⃣ Create a TON-wallet 2️⃣ Add BLC manually 3️⃣ Check trading pairs 4️⃣Find out what you can buy with BulCoin 5️⃣ Keep up with DAO decisions on our channel This is the system entry. BulCoin is being built as an infrastructure. And infrastructure requires participation. Those who enter earlier - understand the mechanics better. #BulCoin FAQ | BUY

Hashtags

BLC Market - mini-app BulCoin

@bulcoin_blc · Post #250 · 17.02.2026 г., 09:30

🟡 Why is BulCoin (BLC) needed at all BulCoin is not just a token. It's a part of infrastructure. Infrastructure where transactions are made without intermediaries. Without blockages. Without "permissions". We are creating an environment where: • value is transferred directly • calculations are made in digital form • participants interact without third parties Mini-app is the first step in using BLC. More to come. A free market is impossible without its own infrastructure. BulCoin is an element of such a system. #BulCoin FAQ | BUY

Hashtags

BLC Market - mini-app BulCoin

@bulcoin_blc · Post #261 · 25.02.2026 г., 11:00

🔥 We are opening the first round of BulCoin participants! 20 random participants will be selected. Each will receive 200 000 BLC. Additionally, a team of 50 early testers of the mini-app will be formed. Participation conditions: — subscription to the channel — comment under this post specifying your TON-address Results will be in 7 days. Results announcement date: 2026-03-04 at 20:00. This is the first stage of forming an active core of BulCoin. #giveaway#BulCoin FAQ | BUY

Асқарбиновая Орда

@askar4308 · Post #15265 · 25.02.2026 г., 17:07

🔥 We are opening the first round of BulCoin participants! 20 random participants will be selected. Each will receive 200 000 BLC. Additionally, a team of 50 early testers of the mini-app will be formed. Participation conditions: — subscription to the channel — comment under this post specifying your TON-address Results will be in 7 days. Results announcement date: 2026-03-04 at 20:00. This is the first stage of forming an active core of BulCoin. #giveaway#BulCoin FAQ | BUY

🔥 Мы открываем первый круг участников BulCoin! Будет выбрано 20 случайных участников. Каждый получит 200 000 BLC. Дополнительно формируется команда из 50 ранних тестеров mini-app. Условия участия: — подписка на канал — комментарий под этим постом указав свой TON-адрес Итоги — через 7 дней. Дата подведения итогов: 2026-03-04 в 20:00. Это первый этап формирования активного ядра BulCoin. #giveaway#BulCoin FAQ | Купить

BLC Market - mini-app BulCoin

@bulcoin_blc · Post #242 · 14.02.2026 г., 19:30

Why do you need BulCoin (BLC)? BulCoin is not just a token. It's an early stage of an ecosystem that is being built around: • a mini-game app • digital economy • early participant community The project is currently in the formation phase. It's at this stage that: — the core of the community is being formed — the first holders appear — history is being laid BulCoin (BLC) is a TON network token. In the coming months, a mini-app will be launched, where BLC will become the gaming currency. But the main thing is that early participants get more opportunities. We don't make loud promises. We are building the system step by step. If you have already created a wallet - you are prepared. It's going to be more interesting from here. #BulCoin#TON#DAO FAQ | BUY

BLC Market - mini-app BulCoin

@bulcoin_blc · Post #314 · 27.03.2026 г., 17:25

We continue to show what the BLC Market will look like. Currently, the basic logic of interaction within the app is under development: — user profile — task structure — navigation within the interface This is the first layer on which the entire system will be built. Next, we will show how exactly users will interact with each other. #freelance#community#BulCoin#BLC#TON FAQ | BUY

12
ПретходнаСтраница 1 од 2Следна