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

Резултати

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

Пребарај: #demographics

当前筛选 #demographics清除筛选
Amazing Geography 🌍

@amazingeo · Post #15 · 10.08.2025 г., 00:12

🌍 In 1800, fewer than 1 billion people lived on Earth. Today, the world population has soared past 8 billion, with more than half living in urban areas like cities and large towns. ✨ #population⚡#urbanization⚡#demographics⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

Amazing Geography 🌍

@amazingeo · Post #211 · 10.09.2025 г., 13:12

🌍 By 2050, city dwellers are expected to make up nearly 70% of the global population. Urban areas are now growing twice as fast as rural regions, reshaping how billions of people live. ✨ #urbanization⚡#cities⚡#demographics⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

Amazing Geography 🌍

@amazingeo · Post #344 · 07.10.2025 г., 18:31

🌍 More than 1 in 3 people alive today live in just two countries—China and India. Together, their populations make up over 2.7 billion people, shaping trends in language, culture, and the global economy. ✨ #population⚡#demographics⚡#Asia⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #605 · 31.01.2026 г., 20:31

🌍 In November 2022, the world’s population reached 8 billion for the first time, doubling in just 48 years since 1974—a record pace in human history for global population growth. ✨ #population⚡#demographics⚡#growth⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #494 · 04.12.2025 г., 20:31

🌍 In 2023, India gained over 13 million people—more than the total population of some countries. This rapid growth boosts its status as the planet’s most populous nation. ✨ #population⚡#demographics⚡#growth⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #264 · 19.09.2025 г., 09:12

🌍 In 2023, Ethiopia recorded the world’s highest annual natural population increase, adding nearly 2.7 million people in a single year—more than many countries’ entire populations. ✨ #population⚡#demographics⚡#growth⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍 ​

International News

@intnewsagency · Post #9345 · 22.04.2026 г., 15:27

Ukraine Considers Raising Retirement Age to 67 Facing a demographic crisis and labor shortages, Ukraine is considering raising the retirement age to 67. Currently, about 10.5 million pensioners equal the number of working-age citizens, straining the pension system. Experts warn the situation will worsen by 2040 due to an aging population. This discussion comes amid record population decline and restrictions on young Ukrainians leaving the country. #Ukraine#pension#demographics#crisis The main news of Russia and the world ishere.

Amazing Geography 🌍

@amazingeo · Post #305 · 27.09.2025 г., 20:31

🌍 Over one million people are added to the world population roughly every five days. The fastest-growing regions are now in parts of Africa, where birth rates remain among the highest globally. ✨ #demographics⚡#growth⚡#continents⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #592 · 25.01.2026 г., 12:31

🌍 In 2022, the number of international migrants reached an estimated 281 million—more than triple the figure from 1970—making up 3.6% of the world’s total population today. ✨ #migration⚡#demographics⚡#movement⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography 👉more Channels ​

Amazing Geography 🌍

@amazingeo · Post #38 · 12.08.2025 г., 20:12

🌍 India is now the world’s most populous country, with more people than any other nation. Its population surpassed 1.4 billion in 2023, highlighting rapid growth and demographic change. ✨ #India⚡#population⚡#demographics⚡#geography⚡#nature⚡#earth 👉subscribe Amazing Geography🌍

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