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

Резултати

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

Пребарај: #lens

当前筛选 #lens清除筛选

Atoms Research | ꘜ 🪂Lens Token Distributor Lens Token Distributor is a powerful machine learning based tool, designed for gasless token distribution The Token Distributor is in testing, rewarding users with $GHO based on their contribution, consistency, influence, and quality Qualifying users will receive $GHO allocations directly to their Lens Accounts. No action is required More details here #lens 💬Discuss in the chat

Hashtags

Как это снято

@fidller_com · Post #728 · 15.06.2021 г., 09:59

этот объектив просто абсурдно массивный. Я считаю, что это самый длинный объектив из когда-либо созданных для байонета EF, а его длина 80 см (31,5 дюйма) и вес 16,5 кг (36,4 фунта) действительно огромны. Когда он был выпущен в 1993 году, он стоил около 90 000 долларов. #canon#ef#newsfidllercom#новости#lens#объектив

AI match predictions

@ai_match_prediction · Post #12076 · 13.05.2026 г., 09:05

France Ligue 1🇫🇷 2026-05-13 17:00 UTC Stade Brestois 29 vs. Strasbourg Predicted outcome: Strasbourg✅ Predicted score: 2:3 Actual: Strasbourg 1:2 #StadeBrestois29#Strasbourg 2026-05-13 19:00 UTC Lens vs. Paris Saint Germain Predicted outcome: Paris Saint Germain✅ Predicted score: 1:2 Actual: Paris Saint Germain 0:2 #Lens#PSG #Football#FranceLigue1

AI match predictions

@ai_match_prediction · Post #11281 · 04.04.2026 г., 09:05

France Ligue 1🇫🇷 2026-04-04 15:00 UTC Strasbourg vs. Nice Predicted outcome: Strasbourg✅ Predicted score: 2:1 Actual: Strasbourg 3:1 #Strasbourg#Nice 2026-04-04 17:00 UTC Stade Brestois 29 vs. Rennes Predicted outcome: Draw❌ Predicted score: 2:2 Actual: Rennes 3:4 #StadeBrestois29#Rennes 2026-04-04 19:05 UTC Lille vs. Lens Predicted outcome: Lens❌ Predicted score: 1:2 Actual: Lille 3:0 #Lille#Lens #Football#FranceLigue1

AI match predictions

@ai_match_prediction · Post #11843 · 02.05.2026 г., 05:05

France Ligue 1🇫🇷 2026-05-02 13:00 UTC Nantes vs. Marseille Predicted outcome: Marseille❌ Predicted score: 1:2 Actual: Nantes 3:0 #Nantes#Marseille 2026-05-02 15:00 UTC Paris Saint Germain vs. Lorient Predicted outcome: Paris Saint Germain❌ Predicted score: 2:1 Actual: Draw 2:2 #PSG#Lorient 2026-05-02 17:00 UTC Metz vs. Monaco Predicted outcome: Monaco✅ Predicted score: 1:2 Actual: Monaco 1:2 #Metz#Monaco 2026-05-02 19:05 UTC Nice vs. Lens Predicted outcome: Lens❌ Predicted score: 1:2 Actual: Draw 1:1 #Nice#Lens #Football#FranceLigue1