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

Резултати

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

Пребарај: #digitalpolicy

当前筛选 #digitalpolicy清除筛选
AI & Law

@ai_and_law · Post #802 · 08.04.2026 г., 07:04

🇪🇺EU AI Act FAQ Updated with Guidance on Agentic AI The European Commission’s AI Act Service Desk added a new section on agentic AI to its FAQ guide under the AI Pact. The update introduces key definitions related to “AI agents” and “agentic AI” and outlines how such systems are addressed within the AI Act framework. The guidance highlights that existing AI Act provisions apply to agentic AI, with particular emphasis on Article 5(1) prohibitions concerning harmful manipulation and exploitation of vulnerabilities, identifying these rules as especially relevant for this category of systems. #AIRegulation#EUAIAct#AgenticAI#AIgovernance#DigitalPolicy

AI & Law

@ai_and_law · Post #636 · 15.08.2025 г., 07:04

🇩🇪Germany’s Digital Minister Calls for a Leaner, More Innovation-Friendly AI Act Germany’s Federal Minister for Digital Transformation and Government Modernisation, Karsten Wildberger, has voiced sharp concerns over the EU AI Act, describing it as “overloaded and too complex.” Speaking to Euractiv, he argued that while addressing risks is essential, the current regulatory framework imposes excessive bureaucracy that could hinder innovation. Wildberger backed the European Commission’s plan to create AI training hubs, or “gigafactories,” as a step toward strengthening Europe’s technological capacity. His position underscores a tension within EU policymaking—balancing robust safeguards with an enabling environment for AI development. #AIRegulation#EUAIAct#Germany#DigitalPolicy

AI & Law

@ai_and_law · Post #806 · 14.04.2026 г., 07:04

📖How Metaphors Shape AI Regulation A research paper by the Centre for Digital Ethics (CEDE), “The Artificial in ‘Artificial Intelligence’: How Imagination Shapes AI Regulation,” examines how metaphorical language influences legal and regulatory approaches to AI. Drawing on cognitive linguistics, the paper argues that concepts such as “intelligence,” “black box,” and “hallucination” are not neutral descriptors but frameworks that shape how risks, responsibility, and authority are understood. The authors highlight that legal interpretation relies on language with normative force, meaning these metaphors can steer regulatory outcomes and create path dependence. For example, “intelligence” encourages anthropomorphism, “black box” narrows focus to the model rather than the broader system, and “hallucinations” mischaracterize predictable errors as anomalies. The paper proposes reframing such errors as design-related risks arising from system features and interaction dynamics. #AIRegulation#AIethics#LegalTheory#AIGovernance#DigitalPolicy

AI & Law

@ai_and_law · Post #796 · 31.03.2026 г., 07:04

🇪🇺EU Rights Bodies Warn on AI Act Amendments in Digital Omnibus Equinet and ENNHRI issued a joint statement raising concerns over proposed amendments to the AI Act within the Digital Omnibus package. The organizations state that changes are being advanced without sufficient impact assessments or public consultation, potentially affecting fundamental rights protections. They also highlight that the AI Act only entered into force on 1 August 2024, with most obligations applying from 2 August 2026, making meaningful assessment of its effects premature. The statement stresses the European Commission’s obligations under EU Treaties and Better Regulation Guidelines to ensure transparent consultation and evidence-based policymaking. It also warns that simplifying regulation based on company size rather than AI system risk could have systemic consequences, given the dominance of SMEs and Small Mid-Caps in the EU economy. Equinet and ENNHRI recommend preserving core safeguards, including AI system registration, powers of fundamental rights authorities, high-risk system timelines, strict necessity standards, AI literacy obligations, and key information requirements. They also oppose weakening GDPR definitions of personal data and proposed changes to automated decision-making rules. #AIRegulation#EUAIAct#FundamentalRights#DigitalPolicy#GDPR