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

Резултати

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

Пребарај: #services

当前筛选 #services清除筛选
Bali News

@balinews · Post #318 · 12.02.2025 г., 12:32

🚕 A new online taxi service Zendo has launched in Bali 📰 While Balinese taxi drivers are trying to resist Gojek and Grab services that have taken over the market, another competitor has almost imperceptibly appeared, ready to offer affordable bike rides to the population. ℹ️Zendo is an Indonesian taxi, delivery and cleaning service covering 25 cities in Indonesia. Now the services are also available in Bali. The island has become one of the 45 places where the service plans to come in 2025. 👍 Representatives of the service write that they are ready to provide any service, as long as it does not violate the law. @BaliNews #goodnews#services#transport

Car News

@car_news · Post #1919 · 27.03.2026 г., 08:31

🚖 Uber launches robotaxis in Europe with Pony AI 📰 Uber has partnered with China’s Pony AI and Croatian startup Verne to launch Europe’s first commercial self-driving taxi service. 📍 Testing is already underway on the streets of Zagreb, and soon users will be able to book driverless rides directly in the Uber app. How it works: • Uber provides the platform and user base • Verne manages the fleet • Pony AI delivers the autonomous driving tech The service will use the Arcfox Alpha T5 electric vehicle (developed with BAIC). The plan is to scale to thousands of robotaxis and expand across Europe. 🧲 The race is on: Waymo is preparing a launch in London, while Volkswagen is gearing up in Germany. #services#selfdriving@Car_News

Bali News

@balinews · Post #338 · 01.03.2025 г., 12:26

🚤New Bali water taxi service launches for tourists 📰 A new marine transportation service, Bali Marine Water Taxi, has been launched in the popular resort area of Benoa (Nusa Dua) in Bali. 📍 The tourist cab service connects the seaports of Tanjung Benoa, Serangan and Pedungan (South Denpasar). 35 minutes. That’s all it takes. No traffic, no stress - just ocean views and open horizons. Uluwatu is calling. 👍 This is just one of the many sea routes Bali plans to develop in the coming months. @BaliNews #goodnews#places#services#transport#tourism#NusaDua

Libreware

@libreware · Post #897 · 13.02.2021 г., 13:53

Modified perl script of @ robertoprubio to use the local file perl disable-trackers-from-recovery.pl --exodus-trackers-pathname <pathname> where <pathname> refers to pathname of the local exodus file that you've downloaded from https://etip.exodus-privacy.eu.org/trackers/export #disablebadservices#disable#blocker#watt#mat#block#ifw#intents#services#ads#tracking

Venture Village Wall 🦄

@venturevillagewall · Post #3402 · 18.12.2024 г., 12:10

Dfns Secures $16M Funding Dfns, the wallet-as-a-service (WaaS) platform, has raised $16 million in funding as of December 18, 2024. The platform is designed to simplify digital asset operations and facilitate safe crypto onboarding for leading organizations. #Dfns#Funding#WaaS#DigitalAssets#Crypto#Operations#Onboarding#Investment#Security#Technology#Finance#Blockchain#Startups#Innovation#Market#Users#Ecosystem#Wallet#Services#Platform#Growth

Venture Village Wall 🦄

@venturevillagewall · Post #3410 · 18.12.2024 г., 12:11

Keepit Secures $50M Funding Keepit raises $50M in funding to enhance its cloud data protection services, leveraging over 20 years of market experience. For more details, visit Keepit. #Funding#Cloud#DataProtection#Keepit#Investment#Tech#Services#Solutions#Market#Experience#Ecosystem#Security#Innovation#Growth#Infrastructure#Digital#Software#Business#Technology

Venture Village Wall 🦄

@venturevillagewall · Post #3409 · 18.12.2024 г., 12:10

Bnewable Secures $42M Funding Bnewable raises $42.02M to enhance energy solutions, focusing on battery-as-a-service and smart energy management systems. Energy management becomes increasingly vital for companies. #Bnewable#Funding#Energy#Management#Tech#BatteryAsAService#Sustainable#Innovation#SmartSystems#Utilities#Investment#Startups#CleanEnergy#Solutions#Growth#Development#Industry#Future#Strategy#Services