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 слични објави

Пребарај: #peertopeer

当前筛选 #peertopeer清除筛选
Venture Village Wall 🦄

@venturevillagewall · Post #3780 · 03.01.2025 г., 10:00

Bitcoin Turns 16: Celebrating Blockchain's Birth 🎉 Bitcoin celebrates its 16th anniversary today, marking the generation of its genesis block on January 3, 2009, by Satoshi Nakamoto. This milestone began a monetary revolution focused on decentralization and sovereignty. 🔗 Read more: Celebrating Bitcoin 🔗 Earlier report: Identity of Satoshi Nakamoto Revealed? ⚖️ On a legal note, Do Kwon faces serious accusations including fraud and money laundering, with a potential prison sentence of 130 years if convicted. His next court hearing is set for January 8. 🔗 More on Kwon: Reuters 🔮 Experts predict significant developments for cryptocurrency and AI integration by 2025, with Bitcoin potentially hitting $500,000. #Bitcoin#SatoshiNakamoto#DoKwon#Terra#Crypto#Blockchain#Fraud#MoneyLaundering#AI#VC#Economy #2025 #Cryptocurrency#Investment#BlockchainTechnology#Legal#Innovation#Milestone#Anniversary#Decentralization#PeerToPeer

Venture Village Wall 🦄

@venturevillagewall · Post #4026 · 30.01.2025 г., 04:00

Bitcoin Tax Fraud Case Sentenced Texas resident Frank Richard Ahlgren III faces two years in prison for tax evasion linked to the sale of $4M in Bitcoin. Ordered to pay $1,095,031 in restitution, this marks the first purely crypto-related tax fraud case in the U.S. Ahlgren concealed transactions using multiple wallets and mixers like CoinJoin and Wasabi Wallet. Details: source #Bitcoin#Crypto#TaxFraud#Blockchain#USA#Court#Restitution#Legal#Finance#Tax#CryptoRegulation#CryptoNews#Ahlgren#PeerToPeer#Wallets#Mixers#CoinJoin#WasabiWallet#Chainalysis#Investigation#Fraud