Бывает начинающие в процессе обучения создают файлы с именем модуля который они изучают. В результате на тестовых запусках ничего не работает😱
Всё потому, что появилась коллизия имён. Например, изучаете вы модуль 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
🪐 On the outskirts of our galaxy, astronomers have detected a mysterious radio signal from the direction of the dwarf galaxy Leo I, which sits about 820,000 light-years away. While this signal is not evidence of aliens, its unusual features have made Leo I a target for SETI (Search for Extraterrestrial Intelligence) researchers who are carefully studying its properties to rule out natural sources—demonstrating how real cosmic signals from known galaxies push the boundaries of the scientific search for life beyond Earth. ✨
#aliens⚡#SETI⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 2017, astronomers detected a possible candidate for an extraterrestrial signal known as BLC1 from the direction of Proxima Centauri, the closest star system to our Sun. Follow-up studies showed the signal was likely human-made interference, but the discovery led to months of careful investigation and demonstrated how scientists search for alien technology by sifting through real, named stars for artificial-looking radio waves. ✨
#aliens⚡#SETI⚡#exoplanets⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 2020, astronomers using the Breakthrough Listen initiative scanned 1327 nearby stars up to 160 light-years away—including known exoplanet systems like Epsilon Eridani and Tau Ceti—for artificial radio signals that could hint at advanced alien technology. Although the search revealed over 9 million candidate signals, all were traced back to Earth-made sources, highlighting both the challenge and the rigor of the scientific hunt for extraterrestrial intelligence. ✨
#aliens⚡#exoplanets⚡#SETI⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 Scientists at the SETI Institute used the MeerKAT radio telescope in South Africa to scan the star system HD 164595, located about 94 light-years from Earth, after an unexplained radio signal was detected there in 2016. While no follow-up signals were found and natural or human-made origins are possible, the search highlights how carefully astronomers investigate even the faintest hints of possible alien technology from real, named stars in our galaxy. ✨
#aliens⚡#SETI⚡#radio⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 Between 1960 and 1998, the Arecibo radio telescope in Puerto Rico transmitted several powerful messages toward star clusters like M13 in the hope that intelligent aliens, if they exist, might detect and respond. These "active SETI" attempts used coded radio signals aimed at real star systems—making the search for extraterrestrial life not just a matter of listening, but also of sending greetings out into the galaxy with real, named astronomical targets. ✨
#aliens⚡#SETI⚡#radioastronomy⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The SETI Institute's ongoing Breakthrough Listen project regularly targets the region around the star Proxima Centauri—our solar system’s closest neighbor—searching for unusual radio signals that could hint at alien technology. By scanning billions of radio frequencies from Proxima Centauri and other nearby stars, scientists are using real astronomy to explore whether advanced extraterrestrial civilizations might exist within our interstellar neighborhood. ✨
#aliens⚡#ProximaCentauri⚡#SETI⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The SETI Institute regularly scans the region near the star Ross 128, about 11 light-years away, after unusual radio signals were detected from its direction in 2017. Although those signals were later traced to Earth-based interference, the careful monitoring of Ross 128 shows how scientists use real stars as targets in the ongoing search for signs of life beyond our solar system. ✨
#aliens⚡#SETI⚡#Ross128⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 One of the most famous searches for alien life involves listening for signals from the direction of Tabby’s Star (KIC 8462852), a real star in the constellation Cygnus known for its strange, unpredictable dips in brightness. Scientists at the SETI Institute have pointed sensitive radio telescopes at Tabby’s Star, searching for artificial signals that could suggest advanced technology, but so far, no evidence of extraterrestrial messages has been found—leaving the nature of the star’s odd behavior a true cosmic mystery. ✨
#aliens⚡#SETI⚡#Tabby⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels