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

Резултати

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

Пребарај: #mammoth

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

@interesting_planet_facts · Post #1269 · 02.02.2026 г., 22:11

🌎 In Siberia, the woolly mammoth roamed the tundra until about 4,000 years ago. Some frozen mammoth carcasses still contain preserved hair, skin, and even stomach contents. Recent DNA studies show mammoths were closely related to modern Asian elephants. ✨ #mammoth⚡#extinction⚡#Siberia 👉subscribe Interesting Planet 👉more Channels ​

Venture Village Wall 🦄

@venturevillagewall · Post #4209 · 21.02.2025 г., 16:00

Massive News Roundup This Week! 1️⃣ Explore OpenAI's *50 rules for ChatGPT* - Read More 2️⃣ Insightful article on *Solopreneurs* and shifting entrepreneurship - Read More 3️⃣ Interview with *Eugene Mutovkin* on the e-scooter market - Watch Here 4️⃣ *Maxim Spiridonov* interviews *Dmitry Zatsepin* on self-managed teams - Watch Here 5️⃣ Guides on launching startups and fundraising - Startup Guide, Funding Guide, Term Sheets, Duolingo Insights 6️⃣ Wired reports on the *Zizians* cult and their extreme actions - Read Article 7️⃣ Forbes discusses *Colossal Biosciences* and their goal to resurrect the mammoth - Read More Crypto Updates: - Bybit exchange reported a hack leading to $1.4 billion in losses. More Info - SBF from FTX claims innocence; an appeal is underway. - $10M raised by *WalletConnect Foundation* in token sales - Details Here Experts note: *Altcoin season is selective* with capital shifting behavior impacted by institutionalization. Read More #OpenAI#ChatGPT#Entrepreneurship#Scooters#Zizians#Mammoth#Bybit#FTX#WalletConnect#Altcoins#Crypto#VC#AI