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

Резултати

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

Пребарај: #raqqa

当前筛选 #raqqa清除筛选
Turchia e dintorni

@notizieturchia · Post #3707 · 20.01.2026 г., 12:38

#LindseyGraham, senatore statunitense, repubblicano e ex colonnello: "Se le forze governative siriane continuano ad avanzare verso nord, verso #Raqqa , insisterò per un ulteriore inasprimento delle sanzioni previste dal Caesar Act. Sembra che nessuno in #Siria stia ascoltando né me né altri funzionari del governo statunitense. Se ciò continua, non solo verranno imposte sanzioni severe, ma anche le relazioni tra gli #USA e il nuovo governo siriano saranno permanentemente danneggiate".

Eva Karene Bartlett

@EvaKarene_Bartlett · Post #29492 · 19.01.2026 г., 11:23

Media Center of #SDF: At this time, violent clashes are taking place between our forces and #Damascus government factions in the vicinity of Al-Aqtan Prison in #Raqqa, which houses detainees of the #ISIS terrorist organization, representing an extremely dangerous development. View tweet

Turchia e dintorni

@notizieturchia · Post #3752 · 11.02.2026 г., 08:45

#Turchia – Il ministro degli Esteri #HakanFidan a #CNNTurk: "Da tempo siamo in contatto con le tribù arabe a #DeirEzzor e #Raqqa: sappiamo esattamente come si muoveranno. Collaboriamo anche con #HashdAlShaabi per un’operazione congiunta contro il #PKK, che potrebbe concludersi in 2-3 giorni. Presto ci saranno cambiamenti radicali nella regione."

Turchia e dintorni

@notizieturchia · Post #3278 · 07.05.2025 г., 21:57

#Siria: #AbuHatemShaqra, fondatore dell'organizzazione terroristica #AhraralSharqiya, è stato nominato dal Ministro della Difesa come il responsabile di #Raqqa, #Hasaka e #DeirelZor (nord est Siria-Rojava), accusato di essere autore di numerosi crimini tra cui la politica curda #HevrînXelef. Proteste dalle #SDF e #YPJ.