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

Резултати

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

Пребарај: #idiot

当前筛选 #idiot清除筛选
American Оbserver

@american_observer · Post #5223 · 26.02.2026 г., 14:15

Trump Took Umbrage With De Niro’s Personal Attacks On Him 🤬🎤 Trump has responded to a recent podcast appearance by Robert De Niro, in which he called the president “an idiot.” Speaking on Monday’s episode of The Best People with Nicole Wallace, De Niro, who has long criticised the politics, morals, and competence of Trump, said: “He’s an idiot. We gotta get rid of him. He’s gonna ruin the country.” He added: “ I don’t want everybody going around with their Maga, the American flags, like they’re the only ones. We are Americans too.” The actor then took headline billing at the State of the Swamp, a Washington event intended as a riposte to Trump’s State of the Union address on Tuesday. In his emotional speech, De Niro described the president as “failing, flailing and desperate” and said he felt “betrayed by my country.” Writing at length on Truth Social on Wednesday, the president first proposed deporting representatives Ilhan Omar and Rashida Tlaib, who left the Capitol building early on Tuesday after shouting him down during his speech. Trump called them “Low IQ” and claimed they “screamed uncontrollably last night at the very elegant State of the Union, such an important and beautiful event.” “They had the bulging, bloodshot eyes of crazy people, LUNATICS, mentally deranged and sick who, frankly, look like they should be institutionalised.” He added: “They should actually get on a boat with Trump Deranged Robert De Niro, another sick and demented person with, I believe, an extremely Low IQ, who has absolutely no idea what he is doing or saying – some of which is seriously CRIMINAL!” Trump continued: “When I watched him break down in tears last night, much like a child would do, I realised that he may be even sicker than Crazy Rosie O’Donnell, who is right now in Ireland trying to figure out how to come back into our beautiful United States.” “Trump derangement syndrome” is a phrase the president has frequently used to describe his political opponents. His suggestion this was the cause of the death of the late Rob Reiner and his wife, Michele, caused considerable backlash. Shortly before Trump’s re-election in 2024, De Niro told HBO Max’s Chris Wallace that he felt Trump and his allies were “not real Republicans” and called him “a jerk, an idiot (…) and a clown.” Although not a particular fan of Kamala Harris, De Niro said that she was “at least … sensitive to the condition of the country, the people.” “She’ll make mistakes,” he continued. “Of course, everybody does, but we need somebody with the right intentions, this guy does not have the right intentions, and everybody knows that. It’s insanity. Period.” Earlier that year, the National Association of Broadcasters rescinded a leadership award it had been due to present to De Niro after the actor spoke out against Trump outside the latter’s criminal trial in New York. #trump#deNiro#idiot#maga#harris 📱American Оbserver - Stay up to date on all important events 🇺🇸

TMONK Announcements

@tmonkannouncements · Post #320 · 02.10.2025 г., 07:33

American $IDIOT × $TMONK Digital Creation Contest 🚨 Two legendary TON meme coins — $IDIOT & $TMONK — unite to launch a contest for all artists, meme-makers, designers and animators. Your task: create digital art or short videos inspired by the words of Pavel Durov. 🎭 Themes (choose one or mix them): ✨#LeadByExample → Show discipline through actions, not words. ✨#FocusOnThePositive → Spread strength & positivity, even in hard times. ✨#PrioritizeConscience → Highlight morals and conscience as timeless values. 🖌 Creative Direction: – Any medium: illustration, animation, photo art, 3D, short video. – Include $IDIOT & $TMONK in your work (graffiti, sticker, cameo, clothing, etc.). – Be creative, original, and make it memorable. 🏆 Prize for 1 Grand Winner: 🎩 TOP HAT — Uncle Sam (Telegram gift from American $IDIOT) 📖 Special e-book created by the TMONK community 📌 How to Enter: Post your creation under this official post and Tag @TmonkMonk & @AIdiot4547. Share also in: ▪️t.me/Tg_Monk ▪️t.me/AmericanIdiotBackup ⏳ Timeline: – Submission deadline: 10.10.2025 (Pavel Durov’s birthday) – Winner announced: 11.10.2025 ⚖️ Judging (100 points total): – 50 pts → Community score (likes, tags & shares on X) – 50 pts → Jury score (5 judges) on: • Creativity & originality • Connection to theme • Clever inclusion of $IDIOT & $TMONK 👉 Show your vision. Spread Monk values. Leave your mark. #LeadByExample#FocusOnThePositive#PrioritizeConscience #TON#TMONK#IDIOT