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

Резултати

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

Пребарај: #empathy

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

@interesting_planet_facts · Post #823 · 27.09.2025 г., 18:11

🌎 Mirror neurons in the human brain activate both when performing an action and when observing someone else perform that action. These specialized brain cells are linked to empathy, learning, and understanding intentions of others. Mirror neurons were first identified in the 1990s in monkeys before similar systems were found in humans. ✨ #neuroscience⚡#empathy⚡#learning 👉subscribe Interesting Planet 👉more Channels ​

Venture Village Wall 🦄

@venturevillagewall · Post #3463 · 19.12.2024 г., 13:56

$500K Funding Round Announcement ShowAndTell has raised $500K in funding as of December 4, 2024. This initiative focuses on providing an empathetic treatment coordinator for every patient, prioritizing patient education and trust-building, even outside of clinical settings. For more information visit their website: ShowAndTell #Funding#Healthcare#PatientCare#TrustBuilding#Education#Empathy#TreatmentCoordinator

Health & Safety TIPS

@PrimalTips · Post #1726 · 04.09.2020 г., 18:26

🤔FOOD FOR THOUGHT💭 📌 I would like to expose a situation. If your children don't learn with children with special needs at school and have never been taught that not everyone is equal, maybe you should spend 10 minutes today to explain it to them, 📌Because although they don't currently live with these children at school, they will find them in their lives for sure. 📌In light of recent events regarding the exclusion of a child with autism from attending a school trip and a child with Down Syndrome being expelled from dance class because she couldn't keep up with it, I feel the need to share this. 📌There are boys and girls that no one invites to birthday parties. There are special children who want to be part of a team but are not selected because it's more important to win than to include these children. 📌 Kids with special needs aren't weird , they just want what everyone wants: to be accepted! 📌Can I ask a question? Is there anyone willing share this article like I did, for all the special children out there? 📌Please teach your children to be kind to these beautiful children! 📌Everyone needs love and kindness #inclusion#syndromedown#autism#beingdifferentlynormal#respect#love#empathy@HeathSafetyTps