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

Резултати

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

Пребарај: #posts

当前筛选 #posts清除筛选
News and Tips

@NewsAndTipsNT · Post #3544 · 06.08.2025 г., 11:18

🔎Telegram May Be Quietly Testing a Feed like Feature Telegram has recently introduced a new ‘Posts’ tab in Search, allowing users to easily discover content from public channels. This update comes roughly a year after the launch of #hashtagsearch, signaling Telegram’s continued focus on improving content discoverability. This appears to be a soft launch of a potential future ‘Feed’ feature — offering users a scrollable stream of relevant #posts, possibly influenced by engagement metrics such as stars. If fully implemented, this feature could significantly boost post visibility for channels, increase ad exposure for advertisers, and enhance ad revenue opportunities for creators. All indications suggest that Telegram is gearing up to roll out a #feed-based content experience, a move that could reshape how users browse and interact on the platform.

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40365 · 19.12.2025 г., 21:21

When the chat reaches 4,000 members or the channel 90,000, 10 group members will be allowed to create a post each, about a sfw topic of their own chosing. You must give @googlefactss permission to use your post and add it to the channel, with or without your username. More details will come after we hit these numbers. Invite friends, family, and coworkers to join. Do not spam/send links without permission of the place you send them in!! Our group links are: Main channel https://t.me/googlefactss Group: https://t.me/googlefactssgroup @googlefactss📢👥 #Community#Permission#Posts#Growth#KeepTrackOfThisPost

BotsGram®

@botsgram_cu · Post #3169 · 25.11.2020 г., 16:40

@channely_bot Qué puede hacer este bot? Este bot es el mejor asistente para la gestión de canales en Telegram. Conecto los canales al servicio principal. ¡Incluyendo un rico entorno webUI de edición! https://app.channely.co/ Idioma: Inglés (visto en @BotsGram.cu) #canales, #canal, #gestión, # administración, #richeditor, #posts, #schedule, #polls, #comment, #commenting, #reactions, #editor, #share, #buttons, #webui, #subscribe, #stats, #users, #trial, #limited, #proaccount