TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #60 · 31 мар.

Вторая по частоте future-функция, которую я использовал, это абсолютный импорт from __future__ import absolute_import Что она делает? Изменения, которые вносит эта инъекция описаны в PEP328 Покажу простой пример. Допустим, есть такой пакет: /my_package /__init__.py /main.py /string.py Смотрим код в my_package/main.py # main.py import string Простой пример готов) Вопрос в том, какой модуль импортируется в данном случае? Есть два варианта: 1. модуль в моём пакете my_package.string 2. стандартный модуль string И вот тут вступает в дело приоритет импортов. В Python2 порядок следующий: помимо иных источников, раньше ищется модуль внутри текущего пакета, а потом в стандартных библиотеках. Таким образом мы импортнём my_package.string. Но в Python3 это поведение изменилось. Если мы указываем просто имя пакета, то ищется именно такой модуль, игнорируя имена в текущем пакете. Если мы хотим импортнуть именно подмодуль из нашего пакета то, мы должны теперь явно это указывать. from my_package import string или относительный импорт, но с указанием пути относительно текущего модуля main from . import string Еще одной неоднозначностью меньше 😎 Подробней про импорты здесь: https://docs.python.org/3/tutorial/modules.html #2to3#pep#basic

Резултати

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

Пребарај: #labs

当前筛选 #labs清除筛选
@belajarnetworking

@belajarnetworking · Post #382 · 08.03.2017 г., 12:02

#labs[.pka] Part 1: Basic Networking - 1-1 Basic Configuration http://www.ranet.co.th/packetlab/ccna/NA-1-1-BasicConfig.pka - 1-2 IPv4 Addressing http://www.ranet.co.th/packetlab/ccna/NA-1-2-IPv4addressing.pka - 1-3 IPv6 Addressing http://www.ranet.co.th/packetlab/ccna/NA-1-3-IPv6addressing.pka Part 2: LAN Technology - 2-1 InterVLAN Routing http://www.ranet.co.th/packetlab/ccna/NA-2-1-InterVLAN.pka - 2-2 VTP http://www.ranet.co.th/packetlab/ccna/NA-2-2-VTP.pka - 2-3 STP http://www.ranet.co.th/packetlab/ccna/NA-2-3-STP.pka Part 3: WAN Technology - 3-1 PPP - PAP http://www.ranet.co.th/packetlab/ccna/NA-3-1-PPP-PAP.pka - 3-2 PPP - CHAP http://www.ranet.co.th/packetlab/ccna/NA-3-2-PPP-CHAP.pka - 3-3 Frame Relay - Multipoint http://www.ranet.co.th/packetlab/ccna/NA-3-3-FR-Multipoint.pka - 3-4 Frame Relay - Point-to-Point http://www.ranet.co.th/packetlab/ccna/NA-3-4-FR-P2P.pka Part 4: IP Routing and Services - 4-1 Static and Default Route http://www.ranet.co.th/packetlab/ccna/NA-4-1-Static-Default-Route.pka - 4-2 RIP http://www.ranet.co.th/packetlab/ccna/NA-4-2-RIP.pka - 4-3 OSPF http://www.ranet.co.th/packetlab/ccna/NA-4-3-OSPF.pka - 4-4 EIGRP http://www.ranet.co.th/packetlab/ccna/NA-4-4-EIGRP.pka - 4-5 Port Security http://www.ranet.co.th/packetlab/ccna/NA-4-5-PortSecurity.pka - 4-6 Access Control List http://www.ranet.co.th/packetlab/ccna/NA-4-6-AccessList.pka - 4-7 NAT http://www.ranet.co.th/packetlab/ccna/NA-4-7-NAT.pka - 4-8 VPN-IPsec http://www.ranet.co.th/packetlab/ccna/NA-4-8-VPN.pka - 4-9 DHCP http://www.ranet.co.th/packetlab/ccna/NA-4-9-DHCP.pka

Hashtags

@belajarnetworking

@belajarnetworking · Post #181 · 21.01.2017 г., 12:05

r e u p l o a d ‌ #labsCCNA Full Labs .pka "File activity labs yang saat ini sedang rutin dikerjakan, silakan di download. Ada 5 buah folder: dan ebook guide nya" Content: - I: Network Fundamentals - II: Routing Protocols and Concepts - III: LAN Switching and Wireless - IV: Accessing the WAN - ++ Completed Activities

Hashtags

Venture Village Wall 🦄

@venturevillagewall · Post #3381 · 18.12.2024 г., 12:09

Fight Disinformation with AI INAR .IA Labs & Technologies has raised $1.21M for its innovative SaaS platform aimed at automating the detection and verification of disinformation across online content. Scheduled to launch on December 18, 2024, this multimodal and multilingual tool is set to enhance online security and information integrity. More details can be found at TrueFlag. #Funding#Technology#AI#SaaS#Disinformation#Verification#OnlineSafety#Security#Innovation#Automation#Multimodal#Multilingual#Integrity#Content#Platform#Launch #2024 #INAR#TrueFlag#Labs

GitHub Trends

@githubtrending · Post #14895 · 02.07.2025 г., 12:00

#python#copilot#csharp#dotnet#github#github_copilot#github_copilot_chat#github_copilot_for_azure#github_copilot_free#github_copilot_training#javascript#lab#labs#microsoft#python#sql#tutorial#tutorial_code#tutorial_exercises#visual_studio_code#vscode GitHub Copilot’s new Agent Mode is a powerful AI coding partner that goes beyond just suggesting code—it can independently write, debug, and improve your code, handle complex workflows, and even fix its own mistakes automatically. It works with multiple programming languages and integrates with popular development tools, helping you save time on repetitive tasks like testing, deployment, and refactoring. By using natural language prompts, you can guide it to complete multi-step projects, making coding faster and easier whether you’re a beginner or an expert. This course teaches you how to fully use these features, boosting your productivity and coding skills. https://github.com/microsoft/Mastering-GitHub-Copilot-for-Paired-Programming