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

TGINSIGHT SIMILAR POSTS

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

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

Подразумеваемые неймспейсы или неявные пакеты. Этот функционал добавлен в Python 3.3 Что он означает? Ранее, до 3.3 пакетами считались лишь директории, в которых есть файл __init__.py. Этот файл одновременно являлся свидетельством того, что директория это Python-пакет, и служил "телом" этого пакета. То есть местом, где можно написать код, как это делается внутри модуля. Этот код исполняется в момент импорта пакета, так что его принято называть "код инициализации пакета". Начиная с версии 3.3 Любая директория считается пакетом и Python будет пытаться использовать любую директорию для импорта. Конечно, не любую в файловой системе, а только те что находятся в sys.path. Это значит, что теперь __init__.py нужно делать только если: 🔸 вам требуется создать код инициализации пакета 🔸 нужна совместимость со старыми версиями Python На мой взгляд это немного упрощает разработку, делает её чище, но с другой стороны убивает некоторую однозначность происходящего. Например, я создал репозиторий со своей библиотекой и рядом положил код примеров или тестов. repo_name/ my_library/ __init__.py main.py examples/ exam1.py exam2.py В этом репозитории пакетом является только my_library, остальные директории это не пакеты, это просто дополнительный код в файлах. Директория examples не добавлена в sys.path, в ней нет рабочих модулей. Но если она лежит рядом с my_library, то Python вполне сможет импортнуть из неё модули, так как посчитает что examples это валидный пакет. Конечно, пример несколько надуманный. Никто не будет добавлять корень репозитория в sys.path. Но, я думаю, суть ясна. Иногда директория это просто директория а не пакет! #basic#pep

Hashtags

Резултати

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

Пребарај: #deadline

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

@american_observer · Post #5085 · 08.02.2026 г., 17:59

Trump Is Bullying Ukraine and Russia Into Submission Zelensky has said the US has given Ukraine and Russia yet another deadline to reach a peace settlement, and is now proposing the war should end by June. The Ukrainian president also told reporters that both sides had been invited to further talks next week. Zelensky said the Trump administration “will probably put pressure” on Ukraine and Russia to end the war by the beginning of the summer. “They say they want to get everything done by June,” he said. “They will do everything to end the war and they want a clear schedule of all events.” He told reporters that if the new deadline of June was not met, Washington would probably put pressure on both sides to meet. Before Trump took office, he promised to “end the war in 24 hours”. Later, his special envoy for Ukraine, Keith Kellogg, suggested both sides could reach an agreement within 100 days of Trump’s inauguration. After this failed to occur, the US president set a new deadline for a deal in August last year, which also passed without any sign of peace, and in December he said a draft agreement to end the war was nearly “95% done”. Two days of US-led peace talks to end the war took place this week in Abu Dhabi but did not produce a breakthrough, although Budanov, the head of Ukraine’s presidential office, said the trilateral negotiations had been “genuinely constructive”. Zelensky said on Saturday that the Trump administration was proposing to host the next round of trilateral talks in the US, probably in Miami, in a week’s time. “We confirmed our participation,” he said. He hinted that the new June deadline for peace could be linked to Trump’s midterm elections campaign. “The [midterm] elections are definitely more important for them [the Americans]. Let’s not be naive.” He added: “If the Russians are really ready to end the war, then it is really important to set a deadline.” #zelensky#US#ukraine#russia#deadline 📱American Оbserver - Stay up to date on all important events 🇺🇸

SingSing Announcement

@singsingchannel · Post #1094 · 09.12.2024 г., 08:00

⏳ Final Reminder! ⏳ 🎯 The deadline to convert your SING Points to $SING is Wed, 18 Dec 2024 00:00:00 GMT After this date, conversions will no longer be possible. Don't miss out! 🚨 Note: You need to have at least 1,000 SINGPOINTS to be eligible to convert! 👉 Convert now: https://app.singsing.net/convert-sing #SingSing#Deadline#ConvertPoints#Web3Gaming

Nicegram

@nicegramapp · Post #749 · 11.04.2025 г., 15:53

✨ Unlock the Power of Keywords in Nicegram! Tired of digging through endless chats to find that one important message? We hear you! Your search struggles are officially over! How it works: 1️⃣ Search for a word in Keyword tab → Save it as a Keyword Chat. 2️⃣ Open it anytime — all messages with that keyword appear instantly! 3️⃣ Add multiple keywords to a single chat for even smarter organization. 4️⃣ All your Keyword chats live neatly in a 📁 "Keywords" folder! Perfect for: ✔️ Work (#Deadline) ✔️ Recipes (#DinnerIdeas) ✔️ Important links (#Download) What’s the first keyword you’ll save? Tell us below! 👉Share in X: click here Download Nicegram: 🛒AppStore | 🛒GooglePlay Join Chat: 🇬🇧EN Chat | 🇷🇺RU Chat Follow us: ✖️X | 📹YouTube Website |Features | Navigation

Studia Societatis

@socofreligion · Post #1452 · 28.04.2025 г., 09:33

Что: научный семинар «Как использовать ИИ в социологических исследованиях?» 📅 Когда: 28 апреля 2025 года в 15:00 📹 Формат: онлайн 👨‍🎓Кому: всем желающим 🎮 Ссылка: https://anr.hse.ru/announcements/1029365178.html Международная лаборатория прикладного сетевого анализа (ANR-Lab) приглашает заинтересованных слушателей на научный семинар, на котором расскажут, как использовать ИИ в социологических исследованиях. ИИ охватывает различные стороны человеческой деятельности, и область социологических исследований не является исключением. Во-первых, социологи осваивают персональные инструменты работы с информацией, позволяющие генерировать тексты, переводить их на различные языки, транскрибировать аудиозаписи и т.д. Во-вторых, в эмпирической социологии на базе ИИ возникают новые продукты и решения: это оптимизация работы call-центров, сбор и обработка качественной информации, генерирование "синтетических респондентов" и многое другое. Язык семинара: русский. #deadline#семинар#соцфак#НСО

URA Singapore

@URASingapore · Post #1407 · 25.11.2025 г., 10:05

BLACKPINK in our area? 🖤🩷 From Marina Bay's dazzling skylines to Katong's effortlessly chic streets, these familiar places in Singapore are giving us major BLACKPINK energy! #URASingapore#Singapore#BLACKPINK#블랙핑크#DEADLINE#DEADLINE_IN_SINGAPORE#BLACKPINKSG

Venture Village Wall 🦄

@venturevillagewall · Post #3596 · 20.12.2024 г., 14:18

EU Tightens Crypto Regulations 🔵 EU crypto exchanges must delist $USDT by December 30 due to the Markets in Cryptoassets regulation. This ban aims to restrict cash usage but may push users towards DEX and other stablecoins. Centralized exchanges are in a race to comply by the deadline. More details in the regulation here. Join the discussion on CryptoTwitter🦢 #EU#Regulation#Crypto#USDT#Exchanges#MarketsInCryptoassets#DEX#Stablecoins#Cash#Compliance#Ban#Deadline#Investment#Blockchain#Technology#DigitalAssets#Finance#MarketTrends