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

Резултати

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

Пребарај: #pyqt

当前筛选 #pyqt清除筛选
GitHub Trends

@githubtrending · Post #14740 · 23.05.2025 г., 12:30

#python#async#asyncio#cross_platform#downloader#gui#multithreading#pyqt#pyside6#python#qt#software#streaming Ghost Downloader 3 is a fast, AI-powered download manager that works on Windows, Linux, and macOS. It speeds up downloads by splitting files into many parts and using multiple threads, dynamically adjusting to use your full bandwidth. It supports resuming downloads, proxy settings, SSL security, and clipboard monitoring for easy link capture. The interface is modern and user-friendly. This tool helps you download files more quickly and efficiently, with options to control speed and use proxies, making it ideal if you want faster, smarter, and more reliable downloads on your computer[1]. https://github.com/XiaoYouChR/Ghost-Downloader-3

djangoproject

@djangoproject · Post #513 · 30.11.2017 г., 22:00

#AI#Artificial_Intelligence #AJAX #aiohttp #Anaconda #AngularJS #API #Atom #AWS #asyncio (#Asynchronous) #audio #automated_testing #automation #atexit #BeeWare #Big_Data #bitcoin #blockchain #Bluemix #Brython #button #Celery #client #class #classmethod #concurrency #Coroutine #cron #CSS #curl #data_analysis #data_mining #data_processing #database #Deep_Learning#deep_learning #Debian #decorator #deploy #dict #dispatch #django #django_cms #Django_REST_Framework #dropdownbox #Docker #event #Firefox #Flask #form #functions #Generator #GeoDjango #git #Google #GPU #GUI #Gym #host #HTML #httplib #learn #Image_processing #intelligence #input #Instagram #IOT #iPython #Jupyter #lambda #learn #License #Linux #lists #machine_learning #Magenta #map #Matplotlib #Metaprogramming #Micro_services #Micropython #mind #monitoring #MongoDB #modules #Mozilla #Multipart #multi_touch_apps #multiprocessing #Nodes #NoSQL #numeric_computation #numerical #NumPy #network #neural_network #OAuth #object_serialization #OCR #overloading #package #parallel #pipeline #protocols #PostGIS #pyAudioAnalysis #pycon #Pyflakes #PyInstaller #PyPI #PyQt #PySide #PyTorch #pytest #python #Pyvideo_archives #Qt #Raspberry_Pi #React #Redis #random #request #Regular_Expressions (#re) #REST #RSS #satellite #scikit_learn #SciPy #scrapy #searching #selectbox #Selenium #serialization #server #sessions #single_responsibility_principle #socket #Spark #str #submit #task #telegram #template #TensorFlow #test #text_boxes #text #tuples #unicode #Universe #Unix #unit_test #urllib #upload #uWSGI #Web #WSGI