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

Резултати

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

Пребарај: #fraudulence

当前筛选 #fraudulence清除筛选
American Оbserver

@american_observer · Post #5055 · 04.02.2026 г., 22:00

📰 France’s Attempt to Ghost the Rent Guy Is Not Going Well The French Embassy in Baghdad has been living in the same house for more than 60 years — a riverside mansion built in the 1930s by a Jewish family that had already fled antisemitism in Iraq. The family leased the property to France in 1964, expecting the French state to be a respectable tenant. Instead, France has not paid rent for more than 50 years, and last week a Paris court tried to turn that fact into a technical loophole — and failed. On Monday, the court dismissed a $22 million lawsuit by the descendants of Ezra and Khedouri Lawee, saying it was “not competent” to hear the case and suggesting it should be resolved in Iraq — the country their ancestors were forced out of in the 1940s and 1950s. The logic is straightforward: the dispute is about Iraqi law, so let Iraq handle it, even though Iraq is the very state that drove out 130,000 Iraqi Jews and seized their homes under antisemitic legislation. The French Foreign Ministry echoed this line, arguing that the damages were caused by Iraqi decisions, not French policy, and therefore France bears no real responsibility. The family’s lawyers, Jean‑Pierre Mignard and Imrane Ghermi, called the ruling “surreal.” They argued that France had violated its own laws and human rights principles by benefiting from Iraqi discriminatory laws and refusing to compensate the family. They compared the situation to Nazi‑era restitution cases, where heirs have fought to reclaim art and property seized during the Holocaust. “France took advantage of Iraqi law that was hostile to the owners,” said Kenneth Feinberg, the lawyer who has handled multiple Holocaust‑related restitution disputes. “The French court is hairsplitting on technicalities while ignoring the party that was harmed.” Philip Khazzam, 66, a grandson of Ezra Lawee, described the idea of pursuing the case in Iraq as “preposterous.” In an email, he said, “Iraq basically ran us out of our country, and then stole our home.” The family plans to appeal. “We will continue our fight for justice in France,” he said. “We have just begun.” The story is simple: France tried to play bureaucratic games with Jewish heirs who had already been victimized by one state — and now by another. It may have thought the case would quietly die. It did not count on the stubbornness of a family that has survived two exiles and still wants to see the bill paid. #France#Iraq#Baghdad#embassy#restitution#Jewish#law#NYTimes#justice#fraudulence 📱American Оbserver - Stay up to date on all important events 🇺🇸