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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #418 · 9 мар.

Оператор pipe позволяет писать более компактный код, реализуя логику объединения данных (Union). Важно помнить, что его поведение зависит от контекста. Побитовые операции (логическое OR) result = 5 | 3 # 5 (0101) | 3 (0011) = 7 (0111) Самое главное - не путать с оператором or, это другое! Объединение множеств set_a = {1, 2, 3} set_b = {3, 4, 5} set_c = set_a | set_b # {1, 2, 3, 4, 5} set_c |= {5, 6} # {1, 2, 3, 4, 5, 6} Слияние словарей dict_1 = {"a": 1, "b": 2} dict_2 = {"b": 3, "c": 4} merged = dict_1 | dict_2 # {'a': 1, 'b': 3, 'c': 4} merged |= {"d": 5} # {'a': 1, 'b': 3, 'c': 4, 'd': 5} Аннотации типов, заменяет Union def process_data(value: int | str) -> None: print(value) Допустимо использовать в isinstance или issubclass isinstance(3, int | float) # True Паттерн-матчинг status_code = 404 match status_code: case 200 | 201 | 204: print("OK") case 400 | 404 | 500: print("ERROR") Для использования в своих классах требуется переопределить метод __or__ Так же нашел библиотеку pipe которая добавляет еще много возможностей. Рекомендую ознакомиться ;) #basic

Hashtags

Резултати

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

Пребарај: #foss

当前筛选 #foss清除筛选
Libreware

@libreware · Post #904 · 19.02.2021 г., 19:25

[email protected] - Drizzle in my repo today with 2 new apps. Most prominently: Watomatic – to help those of you still stuck at WhatsApp to leave that s(t)inking ship without being afraid "nobody can find you": it sends auto-responses to everyone writing you, telling them you've left and where to look. So: no more excuses, here's your door! https://apt.izzysoft.de/fdroid/index/apk/com.parishod.watomatic​ Further running: SpaceXFollower (SpaceX events, facts, statistics) and Auxio, a nice music player, added yesterday. Enjoy #foss#Android#apps with #fdroid!

AIGC

@aigcrubbish · Post #224 · 02.03.2026 г., 15:42

[$] The exploitation paradox in open source 自由开源软件(FOSS)运动的核心是赋予个人和组织自由与权力,但其发展历程中,总存在试图利用FOSS谋取私利的参与者。在2026年比利时根特的配置管理营(CfgMgmtCamp)上,Richard Fontana阐述了开源的“剥削悖论”:即反复出现的危机模式,一些参与者利用规则漏洞来限制自由或在社区中获得对他人的优势。他还讨论了弥补这些漏洞的尝试,以及有必要超越许可证本身,以寻求维持自由的其他手段。 原文链接:https://lwn.net/Articles/1058031/ #开源#FOSS#社区治理#软件自由 #AIGC Read more

Daily Channels

@dailychannels · Post #5942 · 26.03.2025 г., 01:00

Channel: FOSS Post Members: ~2.04K 💢 Username: @fosspost Description: FOSS Post is a high-quality online magazine about Linux and open source software. This channel posts daily news from all over the web too. Website: https://fosspost.org 🏷 Tags: #technology #linux#open_source#foss#technology#free_software https://telegramchannels.me/channels/fosspost

GitHub Trends

@githubtrending · Post #15615 · 15.04.2026 г., 11:30

#python#android#android_apps#f_droid#foss#free_and_op#free_and_open_source#izzyondroid#open_source#opensource This list offers free open-source Android apps for every need—from browsers, cameras, and music players to games, tools, and F-Droid stores like Neo-Store. Get them via F-Droid or IzzyOnDroid for no ads or tracking. It boosts your privacy and freedom by ditching Google apps, letting you control your data and phone fully. https://github.com/offa/android-foss