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

Резултати

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

Пребарај: #danger

当前筛选 #danger清除筛选
Interesting Planet 🌍

@interesting_planet_facts · Post #1153 · 22.12.2025 г., 12:11

🌎 The African buffalo, also known as Cape buffalo, is responsible for more deaths in Africa than most other large animals. Adult males can weigh up to 900 kilograms and have powerful horns, making them extremely dangerous when threatened. Herds can number in the hundreds and will defend injured members against predators, including humans. ✨ #wildlife⚡#mammals⚡#danger 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1096 · 03.12.2025 г., 18:11

🌎 Mosquitoes are responsible for more human deaths than any other animal on Earth. They transmit diseases like malaria, dengue, Zika, and yellow fever, causing over 700,000 deaths each year worldwide. Some mosquito species can breed in just a bottle cap of water. ✨ #animals⚡#danger⚡#mosquitoes 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #1026 · 12.11.2025 г., 18:11

🌎 The assassin bug, found in tropical and subtropical regions, can inject a powerful enzyme that liquefies the insides of prey. Some species can also deliver painful bites to humans that may trigger allergic reactions. Assassin bugs are responsible for transmitting Chagas disease, which affects millions in Central and South America each year. ✨ #animals⚡#danger⚡#bites 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #721 · 10.09.2025 г., 03:22

🌎 The mosquito is considered the deadliest animal on Earth, causing over 700,000 human deaths each year. Mosquitoes spread malaria, dengue, Zika, yellow fever, and other life-threatening diseases across tropical and subtropical regions, making them a major global health threat. ✨ #animals⚡#danger⚡#diseases 👉subscribe Interesting Planet ​

Universe Mysteries 🪐

@cosmomyst · Post #153 · 18.08.2025 г., 20:11

🪐 The asteroid (137108) 1999 AN10 is an Apollo-type near-Earth object roughly 800 meters wide, and its orbit brings it close enough to Earth every few decades that scientists label it as potentially hazardous. Current calculations predict an especially close approach in 2027, when it will pass within about 390,000 kilometers—almost the same distance as the Moon—making it one of the larger asteroids to come so near our planet in the 21st century. ✨ #asteroids⚡#danger⚡#nearEarth⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Interesting Planet 🌍

@interesting_planet_facts · Post #1065 · 23.11.2025 г., 18:11

🌎 Saltwater crocodiles are among the most dangerous animals on Earth. These massive reptiles can exceed 6 meters in length and have the strongest recorded bite force of any living animal—over 16,000 newtons. Saltwater crocodiles are responsible for hundreds of attacks on humans annually throughout Southeast Asia and northern Australia. ✨ #crocodile⚡#danger⚡#reptiles 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #787 · 20.09.2025 г., 15:11

🌎 Hippos are among the most dangerous large animals in Africa, causing more human deaths annually than lions. Territorial males can attack boats and move surprisingly fast on land, reaching speeds of up to 30 kilometers per hour. ✨ #hippo⚡#wildlife⚡#danger 👉subscribe Interesting Planet ​

Universe Mysteries 🪐

@cosmomyst · Post #136 · 15.08.2025 г., 13:11

🪐 The asteroid (7335) 1989 JA is classified as a "potentially hazardous asteroid" because it's over 1.8 kilometers wide and its orbit brings it close enough to Earth to be watched carefully by astronomers. In 2022, it made a safe pass at about 4 million kilometers from our planet, but its great size means that any future close approach will always be closely monitored for any change in its path. ✨ #asteroids⚡#danger⚡#nearearthobjects⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Interesting Planet 🌍

@interesting_planet_facts · Post #916 · 16.10.2025 г., 12:11

🌎 The freshwater African Nile crocodile holds a notorious reputation as one of Earth's most dangerous animals, responsible for hundreds of human fatalities yearly. Adult males can reach up to 5 meters in length and exert a bite force exceeding 16,000 newtons—one of the strongest in the animal kingdom. ✨ #crocodile⚡#danger⚡#predators 👉subscribe Interesting Planet 👉more Channels ​

Interesting Planet 🌍

@interesting_planet_facts · Post #686 · 04.09.2025 г., 13:22

🌎 Saltwater crocodiles are Earth's largest living reptiles and among the most dangerous animals, capable of ambushing and killing prey as large as water buffalo. Adult males can grow over 6 meters long and weigh up to 1,000 kilograms. ✨ #crocodile⚡#predators⚡#danger 👉subscribe Interesting Planet ​

Universe Mysteries 🪐

@cosmomyst · Post #124 · 13.08.2025 г., 00:11

🪐 On June 30, 1908, a small asteroid or comet exploded over Tunguska, Siberia, flattening 2,000 square kilometers of forest in an instant. Known as the Tunguska event, this airburst was caused by an object about 50–60 meters wide—large enough to release energy more powerful than the largest nuclear bomb ever detonated, yet leaving no impact crater. ✨ #asteroids⚡#danger⚡#Tunguska⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

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