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

TGINSIGHT SIMILAR POSTS

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

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

Подразумеваемые неймспейсы или неявные пакеты. Этот функционал добавлен в Python 3.3 Что он означает? Ранее, до 3.3 пакетами считались лишь директории, в которых есть файл __init__.py. Этот файл одновременно являлся свидетельством того, что директория это Python-пакет, и служил "телом" этого пакета. То есть местом, где можно написать код, как это делается внутри модуля. Этот код исполняется в момент импорта пакета, так что его принято называть "код инициализации пакета". Начиная с версии 3.3 Любая директория считается пакетом и Python будет пытаться использовать любую директорию для импорта. Конечно, не любую в файловой системе, а только те что находятся в sys.path. Это значит, что теперь __init__.py нужно делать только если: 🔸 вам требуется создать код инициализации пакета 🔸 нужна совместимость со старыми версиями Python На мой взгляд это немного упрощает разработку, делает её чище, но с другой стороны убивает некоторую однозначность происходящего. Например, я создал репозиторий со своей библиотекой и рядом положил код примеров или тестов. repo_name/ my_library/ __init__.py main.py examples/ exam1.py exam2.py В этом репозитории пакетом является только my_library, остальные директории это не пакеты, это просто дополнительный код в файлах. Директория examples не добавлена в sys.path, в ней нет рабочих модулей. Но если она лежит рядом с my_library, то Python вполне сможет импортнуть из неё модули, так как посчитает что examples это валидный пакет. Конечно, пример несколько надуманный. Никто не будет добавлять корень репозитория в sys.path. Но, я думаю, суть ясна. Иногда директория это просто директория а не пакет! #basic#pep

Hashtags

Резултати

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

Пребарај: #steam

当前筛选 #steam清除筛选

Steam发布公告:禁止在游戏中植入干扰玩家体验的广告 开发者不应该使用付费广告作为游戏内的业务模式,例如要求玩家观看广告或以其他方式参与广告才能玩游戏,或是用广告来限制游戏内容。 🗒 标签: #Steam

Hashtags

Linuxgram 🐧

@linuxgram · Post #18771 · 13.05.2026 г., 09:59

📰 Unreal Engine 5.8 adds experimental Steam Frame support, Qualcomm give the Steam Frame a dedicated page Valve's new VR kit the Steam Frame appears to be inching closer to a release announcement - here's two more fun bits of news on it for you.Read the full article on GamingOnLinux. 🔗 Source: https://www.gamingonlinux.com/2026/05/unreal-engine-5-8-adds-experimental-steam-frame-support-qualcomm-give-the-steam-frame-a-dedicated-page/ #steam

Hashtags

Linuxgram 🐧

@linuxgram · Post #18567 · 25.04.2026 г., 16:12

📰 Your Gen 5 SSD is probably throttling right now, and you have no idea You paid a premium for 14,000 MB/s speeds, but during a large Steam download or 4K video export, it feels like your PC is struggling to keep up and overall just comes across quite mushy. Unlike a CPU, which might trigger a loud fan spike, an SSD suffers in silence, making it hard for you to identify when it is actually occurring. 🔗 Source: https://www.xda-developers.com/your-pcie-50-ssd-might-be-throttling-without-you-knowing/ #steam

Hashtags

Linuxgram 🐧

@linuxgram · Post #18465 · 16.04.2026 г., 22:16

📰 Proton 11.0 Beta Released With More Games Playable On Steam Play Valve and CodeWeavers have just released Proton 11.0 Beta as their first beta milestone for this software that powers Steam Play now rebased against upstream Wine 11.0... 🔗 Source: https://www.phoronix.com/news/Proton-11.0-Beta #steam

Hashtags

Linuxgram 🐧

@linuxgram · Post #18297 · 03.04.2026 г., 13:59

📰 Valve recently confirmed Steam game pricing updates across different regions At the end of March, Valve issued an announcement to game developers on Steam about changes to how games get priced across different regions.Read the full article on GamingOnLinux. 🔗 Source: https://www.gamingonlinux.com/2026/04/valve-recently-confirmed-steam-game-pricing-updates-across-different-regions/ #steam

Hashtags

Linuxgram 🐧

@linuxgram · Post #18285 · 02.04.2026 г., 15:05

📰 SteamOS 3.8 just dramatically improved a lot of handhelds except the Steam Deck itself The Steam Deck just saw one of its biggest updates enter the preview phase, and if you're on the Preview update channel, then chances are you've already updated it. After such a major update, you might realize that not much has changed, though. SteamOS 3.8 is, by all accounts, one of Valve's most important updates yet. It expands compatibility, improves performance, and lays the groundwork for something much bigger than a handheld. 🔗 Source: https://www.xda-developers.com/steamos-38-dramatically-improves-many-gaming-handhelds-except-steam-deck/ #steam

Hashtags

Linuxgram 🐧

@linuxgram · Post #18119 · 20.03.2026 г., 07:36

📰SteamOS 3.8.0 is finally making the Steam Machine a reality The first glimpse of the Steam Machine's release date is on the horizon. 🔗 Source: https://www.xda-developers.com/steamos-380-is-finally-making-the-steam-machine-a-reality/ #steam

Hashtags

Linuxgram 🐧

@linuxgram · Post #18057 · 13.03.2026 г., 23:43

📰 New Steam Release Fixes Proton Games Wrongly Flagged as Unplayable Also includes opt-in frame rate telemetry, hardware-tagged reviews, and several quality-of-life improvements. 🔗 Source: https://feed.itsfoss.com/link/24361/17298791/steam-client-march-2026-release #steam

Hashtags

Linuxgram 🐧

@linuxgram · Post #17987 · 05.03.2026 г., 22:17

📰 Theme park building game Parkitect gets its first ever Steam Free Weekend Parkitect is an absolute gem and if you've not played this theme park builder before - well, now is your best chance because it's free for a while.Read the full article on GamingOnLinux. 🔗 Source: https://www.gamingonlinux.com/2026/03/theme-park-building-game-parkitect-gets-its-first-ever-steam-free-weekend/ #steam

Hashtags

Linuxgram 🐧

@linuxgram · Post #17846 · 20.02.2026 г., 12:19

📰 Steam Deck now out of stock in Europe in addition to USA, Canada and Asia Unfortunately the stock availability of the Steam Deck has only worsened recently, with Europe now appearing to be completely out of stock.Read the full article on GamingOnLinux. 🔗 Source: https://www.gamingonlinux.com/2026/02/steam-deck-now-out-of-stock-in-europe-in-addition-to-usa-canada-and-asia/ #steam

Hashtags

Linuxgram 🐧

@linuxgram · Post #17810 · 17.02.2026 г., 16:02

📰Valve confirm Steam Deck stock issues due to "memory and storage shortages" We reported recently how the Steam Deck was completely out of stock in the USA, Canada and Asia and now Valve have put up a short statement on it.Read the full article on GamingOnLinux. 🔗 Source: https://www.gamingonlinux.com/2026/02/valve-confirm-steam-deck-stock-issues-due-to-memory-and-storage-shortages/ #steam

Hashtags

123•••10•••20•••30•••3233
ПретходнаСтраница 1 од 33Следна