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

Резултати

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

Пребарај: #delete

当前筛选 #delete清除筛选
BotsGram®

@botsgram_cu · Post #3533 · 20.02.2021 г., 01:41

@MaxDeleteAll_Bot Qué puede hacer este bot? Este bot te ayuda a eliminar gran cantidad de mensajes en tus grupos o canales use use /delall si desea que se eliminen todos los mensajes use use /delfrom (punto inicial) & /delto (punto final) antes de usar /delsel si desea eliminar esos & todos los mensajes posteriores. Idioma: Inglés (visto en @BotsGram_cu) #delete

Hashtags

Libreware

@libreware · Post #942 · 12.05.2021 г., 11:54

Fast FB Delete Tool by marcelja Fast Facebook Activity Deletion This program can be used to clean up a facebook account without deleting the entire account. https://github.com/marcelja/facebook-delete #fb#facebok#delete

VIP_影视分享

@WangZhuanZhan · Post #34022 · 13.10.2024 г., 13:20

S-s删s除c历l史s- 删除历史 Effacer l’historique (2020) 直达链接:https://pan.quark.cn/s/26143ac09464 #删除历史#Effacer l’historique #Delete History #人生档案求删除 链接:https://link3.cc/sf_com #电影#喜剧#其他#2020年代

BotsGram®

@botsgram_cu · Post #3536 · 21.02.2021 г., 01:21

@MassActionBot Qué puede hacer este bot? Este bot puede realizar múltiples acciones en tu Chat. ¿Cuál? Ahí lo tienes.: - Eliminar todos los mensajes - Kick all - Ban all - Silencio todo - Unban all - Activar todo Idioma: Inglés (visto en @BotsGram_cu) #chanel, #groups, #delete, #ban, #kick, #mute

BotsGram®

@botsgram_cu · Post #3217 · 30.11.2020 г., 21:31

@GitHubBot Qué puede hacer este bot? Este es un bot de GitHub. Puede notificarle sobre eventos en sus repositorios públicos de GitHub. También puede responder a tus mensajes para publicar comentarios en GitHub directamente desde Telegram. Idioma: Inglés (visto en @BotsGram_cu) #telegram, #notify, #events, #github, #delete, #public, #command, #messages, #repository

BotsGram®

@botsgram_cu · Post #3251 · 06.12.2020 г., 15:14

@DeleteEventsBot Qué puede hacer este bot? Este bot elimina mensajes de eventos (también conocidos como mensajes de acción) en supergrupos. Idioma: Inglés (visto en @BotsGram_cu) #delete, #service, #message, #spam, #helper, #group, #supergroup, #join, #left, #pinned