Подразумеваемые неймспейсы или неявные пакеты.
Этот функционал добавлен в 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
#LUNC/USDT analysis :
#LUNC is currently in a downtrend, forming lower lows (LLs) and lower highs (LHs) below the 200 EMA. The price has retraced to the 200 EMA and the resistance zone. It is anticipated that the price will continue its bearish momentum and test lower levels.
TF : 1D
Entry : $0.00008532
Target : $0.00006396
SL : $0.00011356
#LUNC/USDT analysis :
#LUNC is presently in a downtrend, trading below the 200 EMA. The price is facing resistance in the current zone, suggesting a possible reversal point. It is expected that the price will reverse from this resistance area and continue its bearish path, potentially revisiting previous low levels.
TF : 2h
Entry : $0.0000765
Target : $0.0000713
SL : $0.0000788
#LUNC/USDT analysis :
#LUNC is currently experiencing a downtrend, trading below the 200 Exponential Moving Average (EMA). The price is encountering resistance in the current zone, indicating a potential reversal point. It is anticipated that the price will reverse from this resistance area and persist in its bearish trajectory, likely retesting prior low levels.
TF : 30min
Entry : $0.0000764
Target : $0.0000716
SL : $0.0000793
#LUNC/USDT analysis :
#LUNC has experienced a breakout followed by a retest of the resistance zone, which has now transformed into a support zone. It is anticipated that the price will receive support at this level, leading to a potential upward movement to sustain its bullish trend and challenge the previous peak.
TF : 4h
Entry : $0.0000835
Target : $0.0000948
SL : $0.0000785
💰#LUNC reached -Order block zone on Daily Time frame,we need breakup from this area to continue the pump and reach the target price zone (0.0005) otherwise will have a correction until the + order block (the Green zone)✅
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️
💰#LUNC broken up the falling wedge pattern on 12H Time frame,also pullback confirmed,we can buy some lunc here🐋
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️
💰#LUNC rejected from the Trendline on 4H Time frame,we are waiting to see the price reaction to the Support zone..⏳
❄️@signals_bitcoin_crypto❄️
❄️@Shadow_support0o❄️