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

Резултати

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

Пребарај: #angers

当前筛选 #angers清除筛选
AI match predictions

@ai_match_prediction · Post #11717 · 25.04.2026 г., 05:05

France Ligue 1🇫🇷 2026-04-25 13:00 UTC Lyon vs. Auxerre Predicted outcome: Lyon✅ Predicted score: 1:0 Actual: Lyon 3:2 #Lyon#Auxerre 2026-04-25 17:00 UTC Angers vs. Paris Saint Germain Predicted outcome: Paris Saint Germain✅ Predicted score: 1:2 Actual: Paris Saint Germain 0:3 #Angers#PSG 2026-04-25 19:05 UTC Toulouse vs. Monaco Predicted outcome: Monaco❌ Predicted score: 1:2 Actual: Draw 2:2 #Toulouse#Monaco #Football#FranceLigue1

AI match predictions

@ai_match_prediction · Post #11568 · 18.04.2026 г., 09:05

France Ligue 1🇫🇷 2026-04-18 15:00 UTC Lorient vs. Marseille Predicted outcome: Draw❌ Predicted score: 2:2 Actual: Lorient 2:0 #Lorient#Marseille 2026-04-18 17:00 UTC Angers vs. Le Havre Predicted outcome: Draw✅ Predicted score: 1:1 Actual: Draw 1:1 #Angers#LEHavre 2026-04-18 19:05 UTC Lille vs. Nice Predicted outcome: Lille❌ Predicted score: 2:1 Actual: Draw 0:0 #Lille#Nice #Football#FranceLigue1

AI match predictions

@ai_match_prediction · Post #11875 · 03.05.2026 г., 05:05

France Ligue 1🇫🇷 2026-05-03 13:00 UTC Lille vs. Le Havre Predicted outcome: Lille❌ Predicted score: 1:0 Actual: Draw 1:1 #Lille#LEHavre 2026-05-03 15:15 UTC Strasbourg vs. Toulouse Predicted outcome: Strasbourg❌ Predicted score: 2:1 Actual: Toulouse 1:2 #Strasbourg#Toulouse 2026-05-03 15:15 UTC Auxerre vs. Angers Predicted outcome: Auxerre✅ Predicted score: 2:1 Actual: Auxerre 3:1 #Auxerre#Angers 2026-05-03 15:15 UTC Paris FC vs. Stade Brestois 29 Predicted outcome: Paris FC✅ Predicted score: 2:1 Actual: Paris FC 4:0 #ParisFC#StadeBrestois29 2026-05-03 18:45 UTC Lyon vs. Rennes Predicted outcome: Lyon✅ Predicted score: 3:2 Actual: Lyon 4:2 #Lyon#Rennes #Football#FranceLigue1

AI match predictions

@ai_match_prediction · Post #11310 · 05.04.2026 г., 05:05

France Ligue 1🇫🇷 2026-04-05 13:00 UTC Angers vs. Lyon Predicted outcome: Lyon❌ Predicted score: 1:2 Actual: Draw 0:0 #Angers#Lyon 2026-04-05 15:15 UTC Lorient vs. Paris FC Predicted outcome: Lorient❌ Predicted score: 2:1 Actual: Draw 1:1 #Lorient#ParisFC 2026-04-05 15:15 UTC Le Havre vs. Auxerre Predicted outcome: Draw✅ Predicted score: 1:1 Actual: Draw 1:1 #LEHavre#Auxerre 2026-04-05 15:15 UTC Metz vs. Nantes Predicted outcome: Draw✅ Predicted score: 2:2 Actual: Draw 0:0 #Metz#Nantes 2026-04-05 18:45 UTC Monaco vs. Marseille Predicted outcome: Monaco✅ Predicted score: 2:1 Actual: Monaco 2:1 #Monaco#Marseille #Football#FranceLigue1

AI match predictions

@ai_match_prediction · Post #12027 · 10.05.2026 г., 13:05

France Ligue 1🇫🇷 2026-05-10 19:00 UTC Angers vs. Strasbourg Predicted outcome: Strasbourg❌ Predicted score: 1:2 Actual: Draw 1:1 #Angers#Strasbourg 2026-05-10 19:00 UTC Paris Saint Germain vs. Stade Brestois 29 Predicted outcome: Paris Saint Germain✅ Predicted score: 3:1 Actual: Paris Saint Germain 1:0 #PSG#StadeBrestois29 2026-05-10 19:00 UTC Monaco vs. Lille Predicted outcome: Lille✅ Predicted score: 1:2 Actual: Lille 0:1 #Monaco#Lille 2026-05-10 19:00 UTC Rennes vs. Paris FC Predicted outcome: Rennes✅ Predicted score: 2:1 Actual: Rennes 2:1 #Rennes#ParisFC 2026-05-10 19:00 UTC Toulouse vs. Lyon Predicted outcome: Lyon❌ Predicted score: 1:2 Actual: Toulouse 2:1 #Toulouse#Lyon 2026-05-10 19:00 UTC Auxerre vs. Nice Predicted outcome: Auxerre✅ Predicted score: 2:1 Actual: Auxerre 2:1 #Auxerre#Nice 2026-05-10 19:00 UTC Le Havre vs. Marseille Predicted outcome: Le Havre❌ Predicted score: 2:1 Actual: Marseille 0:1 #LEHavre#Marseille 2026-05-10 19:00 UTC Metz vs. Lorient Predicted outcome: Lorient✅ Predicted score: 1:2 Actual: Lorient 0:4 #Metz#Lorient #Football#FranceLigue1