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

Резултати

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

Пребарај: #transgender

当前筛选 #transgender清除筛选
America 🇺🇸 News & Politics

@America · Post #10396 · 18.03.2026 г., 13:11

⚖️🇺🇸SUPREME COURT SIDES WITH PARENTS ON TRANS STUDENTS 🔹 Court blocks California schools from hiding students' gender transitions from parents 🏫 🔹 Schools must follow parental instructions on names and pronouns, major victory for families 📝 🔹 Ruling overturns progressive district policies in transgender student cases 🏳️‍⚧️ 🔹 Three Democratic justices dissent, showing deep ideological split on parental rights ⚖️ 🔹 Decision could impact similar policies nationwide as culture wars intensify 🇺🇸 California progressives are furious. Is this the new normal for parental control? 🔥📚 #USNews#SCOTUS#parents#transgender @america

America 🇺🇸 News & Politics

@America · Post #10425 · 26.03.2026 г., 13:14

⚖️🏳️‍⚧️FEDERAL JUDGE CRUSHES RFK'S TRANSGENDER DECREE 🔹 Judge Mustafa Kasubhai demolishes HHS attack on gender-affirming care 🏛️ 🔹 Kennedy exceeded authority, ignored administrative procedures ⚠️ 🔹 Decree called puberty blockers "neither safe nor effective" 💊 🔹 20 Democratic states led by NY AG Letitia James win victory 🗽 🔹 Kennedy's second crushing defeat this week after vaccine ruling ⚖️ Oregon court grants nationwide relief to health providers. Trump promises appeals 📤 Democracy fights back against overreach. Courts defend healthcare rights 💪⚖️ #USNews#transgender#courts#healthcare @america

American Оbserver

@american_observer · Post #5125 · 13.02.2026 г., 18:59

Canada is in mourning after the mass murder of schoolchildren by a transgender minor 9 killed and 27 wounded. A teacher and five students were killed at the school, and a 17-year-old transgender man was killed in a nearby house. Jesse Strang shot his mother and stepbrother, and then committed suicide. Strang began his transgender transition at the age of 15 with the active support of a school psychologist, and immediately began taking large doses of hormones, according to American media channels with reference to online reports. It is known that Strang has been actively visiting the shooting range lately. #canada#mourning#transgender#shooting 📱American Оbserver - Stay up to date on all important events 🇺🇸

Social Justice Watch

@social_justice_watch · Post #17272 · 25.09.2022 г., 01:11

There are infinite ways to be trans. Try not to feel discouraged if your experiences are different from other trans people you know. Your journey is uniquely yours. - [IMAGE DESCRIPTION: A tweet by @im_just_laur that says, "If you see 'trans culture' & just can't connect with it, remember that most of not all mainstream trans culture is made by & for a bunch of white trans people early in their transition. It's not inherent to transness. It's not something you have to relate to to be trans." The background photo is a pink sunset on a beach. The remaining text is too long to fit in the caption but can be found in the comments below or by using the alt text feature.] - #trans#transgender#ftm#mtf#nonbinary#gender#genderqueer#queer#lgbt#lgbtq#pride#transgirl#transboy#transwoman#transguy#transman#protecttransyouth#protecttranskids#transjoy https://www.instagram.com/p/Cic3zpPLbMf/

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