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

Резултати

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

Пребарај: #vts

当前筛选 #vts清除筛选
TOP Signals Spot

@cryptocurreniesbtc · Post #23033 · 09.08.2024 г., 16:28

Hello everyone, 48 hours left until our next free for all pump on MEXC!! The target this time will be 50X-100X gains possibly even more. B Bulls took a stand at the $50k support sparking an immediate and powerful rebound. The market now roars with bullish energy, and momentum is very strong indicating alts monster rally ahead so We can guarantee that this upcoming mega pump will have amazing results like our previous pumps: #YOLO (3200%) #VTS (3500%) #FRTN (6500%) #JET (+10600%) We are pumping on MEXC because MEXC is the best place to profit from small cap gems. There are a lot of trading pairs listed which allow us a breadth of options. Many retail, algo, and daily active traders use MEXC and will add additional volume to our signals and we believe that with our massive buying power we will be able to reach 50X-100X easily possibly even more as there is very little hidden sell pressure in the orderbooks. This event will be the biggest one that we have done in the history of our group and will top our previous ones in terms of % gain. we’re ready to see our biggest volume in history, Be prepared for a massive 50X-100X pump signal on MEXC this Sunday.

Mexc Crypto Signals Pumps Trading Kucoin

@mexc_signals_pumps_trading · Post #1267 · 09.08.2024 г., 17:19

Hello everyone, 47 hours left until our next free for all pump on MEXC!! The target this time will be 50X-100X gains possibly even more. Bulls took a stand at the $50k support sparking an immediate and powerful rebound. The market now roars with bullish energy, and momentum is very strong indicating alts monster rally ahead so We can guarantee that this upcoming mega pump will have amazing results like our previous pumps: #YOLO (3200%) #VTS (3500%) #FRTN (6500%) #JET (+10600%) We are pumping on MEXC because MEXC is the best place to profit from small cap gems. There are a lot of trading pairs listed which allow us a breadth of options. Many retail, algo, and daily active traders use MEXC and will add additional volume to our signals and we believe that with our massive buying power we will be able to reach 50X-100X easily possibly even more as there is very little hidden sell pressure in the orderbooks. This event will be the biggest one that we have done in the history of our group and will top our previous ones in terms of % gain. we’re ready to see our biggest volume in history, Be prepared for a massive 50X-100X pump signal on MEXC this Sunday.