TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #203 · 18 јан.

Бывает начинающие в процессе обучения создают файлы с именем модуля который они изучают. В результате на тестовых запусках ничего не работает😱 Всё потому, что появилась коллизия имён. Например, изучаете вы модуль datetime, и создаёте с таким именем файл (ну логично же😄) прямо в рабочей директории. Потом, при попытке импортировать datetime модуль, из-за приоритета импорта будет импортирован файл из рабочий директории а не оригинальная библиотека. Ведь имя файла это суть имя модуля! А знаете ли вы, что не все стандартные модули можно так перезаписать? Коллизии имён не подвержены builtin модули. Они всегда стоят на первом месте в приоритете импорта, поэтому их нельзя заменить. Полный список таких модулей можно посмотреть в списке sys.builtin_module_names. То есть, вы сломаете весь Python если назовёте свой модуль os или site, но если назовёте time или gc то ничего страшного не случится))) Тем не менее, никогда не называйте модули уже занятыми именами!!!⚠️ Я всегда рекомендую всем своим файлам делать именной префикс из 2-3 символов. Например я называю свои проекты так: pw_project_name pw_ui_tools.py pw_something/main.py Либо под ситуацию tst_scriptname.py (не "test" чтобы не подхватывал pytest) dbg_script.py maya_ui.py hou_menu_tools.py И искать проще, и коллизий нет. #tricks#basic

Резултати

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

Пребарај: #central

当前筛选 #central清除筛选
MTR Service Update

@mtrupdate · Post #6334 · 25.11.2024 г., 21:11

#中環 站 出口 J3 - 香港會所大廈 由於需進行保養工程,預計於 12 月 5 日(星期四)方會重開 乘客請使用 出口 J1 - 終審法院 中環站出口位置 👉metroride.hk/42FfSLy - #Central Exit J3 - Hong Kong Club Building is closed and estimated to be re-opened on 5/Dec (Thu) for maintenance Please use Exit J1 - The Court of Final Appeal Exit locations of Central Station 👉metroride.hk/42FfSLy

MTR Service Update

@mtrupdate · Post #6322 · 18.11.2024 г., 11:30

#中環 站 出口 J1 - 終審法院 由於需進行保養工程,預計於 11 月 26 日(星期二)方會重開 乘客請使用 出口 J3 - 香港會所大廈 中環站出口位置 👉metroride.hk/42FfSLy - #Central Exit J1 - The Court of Final Appeal is closed and estimated to be re-opened on 26/Nov (Tue) for maintenance Please use Exit J3 - The Hong Kong Club Building Exit locations of Central Station 👉metroride.hk/42FfSLy

MTR Service Update

@mtrupdate · Post #6247 · 31.10.2024 г., 08:16

荃灣綫會喺 10 月 31 日(星期四)在深夜 加開由 #中環 站開出的空載列車 🌌🚇🎃 該站部分出口或會於道路封閉期間,實施人潮管理措施,請留意廣播及資訊螢幕,以及車站職員和警務人員的指示 #MTR#Halloween Empty Tsuen Wan Line services from #Central will be operated late at night on 31/Oct (Thu) 🌌🚇🎃 Crowd management measures may apply for some exits at this station during road closure periods Listen to announcements, see info screens and follow instructions from station staff or the police

American Оbserver

@american_observer · Post #4843 · 13.01.2026 г., 13:01

Global Central Banks Booed Trump for His Threats Against Powell Global central banks have issued an extraordinary joint statement offering “full solidarity” to the US Federal Reserve chair, Jerome Powell, in the face of the latest threat to his independence from Donald Trump’s White House. “The independence of central banks is a cornerstone of price, financial and economic stability in the interest of the citizens that we serve. It is therefore critical to preserve that independence, with full respect for the rule of law and democratic accountability,” the statement said. It was signed by nine central bank governors including the Bank of England governor, Andrew Bailey, and the chair of the European Central Bank, Christine Lagarde. It was coordinated by the Basel-based Bank for International Settlements, which added its chair and general manager to the signatories. Other signatories to the unprecedented statement include the central bank governors of Australia, Sweden, Denmark, Switzerland, Brazil, South Korea and Canada. More names are expected to be added later on Tuesday. They pay testament to Powell’s “integrity” and “unwavering commitment to the public interest”, calling him a “respected colleague who is held in the highest regard by all who have worked with him”. Trump has repeatedly criticised Powell, whom he appointed in 2018, for failing to cut interest rates fast enough. But the clash between the two men took a dramatic turn earlier this week when Powell issued a strongly worded video statement, saying he was being prosecuted by the US Department of Justice. He said he had been singled out because the Fed’s policymaking board had set interest rates “based on our best assessment of what will serve the public, rather than following the preferences of the president”. Trump has moved to distance himself from the investigation, however, claiming he was unaware of it. “I don’t know anything about it,” he told NBC News. Powell is due to step down as chair of the Fed board in May, and Trump is expected to announce his successor in the coming weeks. The former Fed chairs Alan Greenspan, Ben Bernanke and Janet Yellen had already condemned the threat to Powell on Monday, saying the move could have “highly negative consequences”. “This is how monetary policy is made in emerging markets with weak institutions, with highly negative consequences for inflation and the functioning of their economies more broadly,” their statement said. #trump#central#banks#threats#powell 📱American Оbserver - Stay up to date on all important events 🇺🇸

VIP_影视分享

@wangzhuanzhan · Post #33466 · 28.09.2024 г., 07:09

W-w乌w龙l特t工g- 乌龙特工 Central Intelligence (2016) 直达链接:https://pan.quark.cn/s/a9fd15e026db #乌龙特工#Central Intelligence #肌智同学会#中央情爆员#中央情报局 链接:https://link3.cc/sf_com #电影#喜剧#美国#10年代

UzCSD | Markaziy depozitariy

@uzcsd · Post #2812 · 09.11.2022 г., 05:04

New issue of Uzbekistan Central Securities Depository’s monthly newsletter “depo-REPORTER” covering key depository news of Octember 2022. Download depo-REPORTER No 14 (PDF, 1.4 Mb) #depo#reporter#news#central#depository#securities#issues deponet.uz|Tg|Fb|Inst|Youtube

UzCSD | Markaziy depozitariy

@uzcsd · Post #2751 · 10.10.2022 г., 12:31

New issue of Uzbekistan Central Securities Depository’s monthly newsletter “depo-REPORTER” covering key depository news of September 2022. Download depo-REPORTER No 13 (PDF, 0.8 Mb) #depo#reporter#news#central#depository#securities#issues deponet.uz|Tg|Fb|Inst|Youtube

UzCSD | Markaziy depozitariy

@uzcsd · Post #2696 · 12.09.2022 г., 05:03

New issue of Uzbekistan Central Securities Depository’s monthly newsletter “depo-REPORTER” covering key depository news of August 2022. Download depo-REPORTER No 12 (PDF, 0.8 Mb) #depo#reporter#news#central#depository#securities#issues www.deponet.uz|Tg|Fb|Inst|Youtube