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

Резултати

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

Пребарај: #concept

当前筛选 #concept清除筛选
Car News

@car_news · Post #1269 · 15.05.2025 г., 12:04

🛸This is futuristic: the Hyperion XP-1 hydrogen car with the sound of a spaceship and steam instead of exhaust 🐎 The engine has 2038 hp and acceleration to 100km/h is 2.2 sec. 🔋 One tank of hydrogen helps to overcome in the region of 1600 km. 💰 They are preparing 300 copies, each of which will cost $2 million. #concept@Car_News

Hashtags

Ares Channel

@ArashRx · Post #417 · 19.01.2024 г., 19:10

🅰Request For Approval Telegram in version 10.6.1 added the ability to restrict incoming messages for Non-Premium subscribers, which creates many restrictions for chats. Read more details in the next post. 🌚Concept designed by @Rxdvl (Still me) -#concept 🅰@ArashRx

Hashtags

Ares Channel

@ArashRx · Post #359 · 13.11.2023 г., 13:49

🅰Emoji Switcher, Hold on an emoji to choose custom emojis Yeah, again a concept, even though it shouldn't be. But this time was @Linus's idea; One of his creative ideas. Designed by me🌚 - #concept 🅰@ArashRx

Hashtags

Ares Channel

@ArashRx · Post #292 · 06.08.2023 г., 20:57

🅰Telegram Drive Concept📥 Telegram Drive is an unlimited storage based on cloud space which, in addition to Saved Messages, has features such as editing images before sending and sending them as albums. Write your opinion about this concept in the comments 🌚Designed by me - #concept 🅰️@ArashRx

Hashtags

Ares Channel

@ArashRx · Post #243 · 19.05.2023 г., 09:13

🅰Telegram Moments Concept🔥 Write your opinion about this feature in the comments 🌚Designed by me - #concept 🅰@ArashRx

Hashtags

Ares Channel

@ArashRx · Post #191 · 05.01.2023 г., 16:42

My first concept for Telegram: 🅰Hashtag Notifications Concept🚀 ※ Select the hashtags you want to join be notified about and get notified when those hashtags are posted in a channel🔥 This is only a concept designed by me and it was sent as a suggestion for Telegram and I hope that this concept will be supported so that we can see this feature in Telegram soon. Write your comments about this concept below this post👇 - #concept ⭕️@ArashRx

Hashtags

DWF Labs Broadcast

@Dwflabs · Post #136 · 09.01.2023 г., 00:21

In our latest episode of DWF Chats, we hosted Ty Blackard, Co-founder and Head of Business Development of NFTY Finance 🙌 Hear more about NFTY Finance, how #defi is changing the #concept of credit score and what's coming up for them in 2023 ✨ Full interview here. Click here to find out more. Get connected 💬 Twitter | Linkedin | Website | Discord

Car News

@car_news · Post #1204 · 17.04.2025 г., 14:32

🎮 Sony has revealed Afeela electric car, which can be driven with the PS5 joystick ℹ️ The Afeela concept was originally stated to have 400kW (536hp) dual-motor all-wheel-drive, 0-100km/h in 4.8 seconds, and a top speed of 240km/h. 💰 Still no information on price or battery size, but there are two more years until this car hits the road, so price will surely come later. @CarsNews #concept#EV

Hashtags

Kpop Premium 《🌿》

@bubbletealuv · Post #3382 · 09.10.2025 г., 21:05

ᝬ 🫐🫐🫐🫐🫐𖠵 ゛ (( 🤩) new post by bubbletealuv ↝ #concept ➛ #TXT.. ✨ …( emoji ) 💭 взяли? буду рад увидеть плюсы и реакции.

Hashtags

123•••78
ПретходнаСтраница 1 од 8Следна