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

Резултати

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

Глобално пребарување

MDC Uzbekistan

@mdcuzbekistan · Post #52 · 27.06.2021 г., 07:52

API dan foydalanish Odatiy hayotimizda ko'plab dasturlardan foydalanamiz, xususan ijtimoiy tarmoqlar(facebook, telegram, instagram...)dan. Sizningcha ushbu ma'lumotlar foydalanuvchi oynasiga qanday qilib tezkorlik bilan uzatiladi? Buning javobi oddiy. Bir dastur bilan ikkinchi dastur o'rtasida muloqotni yaxshilash va aniq tartiblangan holatda uzatish API orqali amalga oshiriladi. 👉Batafsil 👨‍🏫 Mentor: Xondamir Abduxoshimov #csharp#api#basic#dotnet .NET Uzbekistan Community __________ Telegram | Instagram | Youtube

MDC Uzbekistan

@mdcuzbekistan · Post #50 · 26.06.2021 г., 05:52

List Qishloqdan kelganlar list nimaligini uncha tushunmaydi, o'zi list ham shu qo'yxonaga o'xshagan narsa (Xojiboy Tojiboyev) 😂 List - elementlarni va obyektlarni saqlashga moslashgan to'plam. Bu to'plamga List deb nom berilishiga sabab, ro'yxatlar bilan qulay ishlash mumkin (tarjimasidan bilib olsa bo'ladi). Ro'yxatda nima qilishimiz mumkin, elementlarni ixtiyoriy joyga qo'shish yoki ixtiyoriy joyidan o'chirib tashlash va tartiblash (sort) funksiyasi borligi bilan boshqa to'plamlardan ajralib turadi. 👉Batafsil 👨‍🏫 Mentor: Tolibjonov Abdulloh #csharp#collection#list#basic .NET Uzbekistan Community ______ Telegram | Instagram | Youtube

MDC Uzbekistan

@mdcuzbekistan · Post #133 · 20.09.2021 г., 08:30

MVC nima? MVC bu - Model (Model) View (Ko'rinish) Controller (Kontroller) so'zlarning bosh harflari qisqartmasidan olingan bo'lib Architectural design pattern (Arxitekturaviy dizayn paterni) hisoblanadi. 👉Batafsil 👨‍🏫 Mentor: Temur G'aniyev #csharp#mvc#basic#dotnet .NET Uzbekistan Community __________ Telegram | Instagram | Youtube

AIGC

@aigcrubbish · Post #242 · 09.03.2026 г., 14:45

[$] Inspecting and modifying Python types during type checking Python 的静态类型系统有其独特之处:类型注解在运行时是可访问的,但默认不会被求值,其含义由外部类型检查器赋予。这些注解通常使用内置 `typing` 模块中的辅助工具,主流类型检查器对其含义有基本共识。然而,现有的类型系统在描述真实 Python 程序中常见的动态元编程模式时,能力仍显不足。PEP 827("类型操作")旨在为 Python 的类型系统增加新能力,以解决此问题,但社区对该提案的讨论意见不一。 原文链接:https://lwn.net/Articles/1061083/ #Python#类型系统#PEP#编程语言设计 #AIGC Read more

American Оbserver

@american_observer · Post #4905 · 20.01.2026 г., 16:59

The Inhuman World of Ours: Millions of Pregnant Women Without the Basic Care A global shortage of nearly a million midwives is leaving pregnant women without the basic care needed to prevent harm, including the deaths of mothers and babies, according to new research. Almost half the shortage was in Africa, where nine in 10 women lived in a country without enough midwives, the researchers said. Anna af Ugglas, chief executive of the International Confederation of Midwives (ICM) and one of the study’s authors, said: “Nearly 1 million missing midwives means health systems are stretched beyond capacity, midwives are overworked and underpaid, and care becomes rushed and fragmented. “Intervention rates rise, and women are more likely to experience poor-quality care or mistreatment,” she said. “This is not only a workforce issue, it is a quality and safety issue for women and babies.” For all women to receive safe, good-quality care before, during and after pregnancy, an additional 980,000 midwives would be needed across 181 countries, the study found. According to previous research, universal access to midwife-delivered care could prevent two-thirds of maternal and newborn deaths and stillbirths, saving 4.3 million lives annually by 2035. The ICM said the issue was not only a lack of training places for midwives, but also a failure in many countries to employ trained midwives where they were needed and to retain those who were working in health services. Prof Jacqueline Dunkley-Bent, ICM’s chief midwife and another of the report’s authors, said: “In many settings, midwives are educated but not absorbed into the workforce or not enabled to practise fully, compounding this already serious and universal shortage of midwives, and still leaving women without access to the care that midwives are trained to provide.” More than 90% of the global midwife shortage was in low- and middle-income countries. Africa has only 40% of the midwives it needs, the eastern Mediterranean only 31%, and the Americas just 15%, researchers found. Shortfalls were much smaller, although still present, in other regions including south-east Asia and Europe. The study, published in the journal Women and Birth, estimated the number of midwives who would be needed to carry out a list of basic midwifery tasks for all eligible women and babies in 181 countries. The tasks included counselling on contraception, antenatal care and screening, and care during childbirth. Although midwife numbers were increasing, the gap between what was needed and the available workforce looked likely to “persist well into the next decade”, the researchers said – beyond the 2030 deadline set by global sustainable development. #millions#pregnant#women#basic#care 📱American Оbserver - Stay up to date on all important events 🇺🇸

Not Guide

@notguide · Post #21 · 28.05.2024 г., 16:00

Not Guide Navigation Our goal is to make the process of learning web3 understandable, interactive, and beneficial for everyone. We've collected all the necessary guides and instructions in one place. Current campaigns: ⁃ Basics of web3 ⁃ NFTs. Pictures worth millions ⁃ Everything about the TON blockchain ⁃ How to buy cryptocurrency Hashtags: ⁃ #basic / #intern / #advanced ⁃ #earnings ⁃ #update Reflect, doubt, explore. 💎

12
ПретходнаСтраница 2 од 2Следна