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

Резултати

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

Пребарај: #latestsoftware

当前筛选 #latestsoftware清除筛选
MikroTik.SG

@mikrotiksg · Post #314 · 30.07.2025 г., 06:56

Current MikroTik Software Release RouterOS: 7.19.4 | 6.49.18 Winbox: 3.42 / 4.0beta26 SwitcOS: 2.18 SwitchOS lite: 2.20 If you missed 7.19.3, Significantly improved Wi-Fi 6 Performance with RouterOS v7.19.3 (stable) Significantly improved Wi-Fi 6 Performance with RouterOS v7.19.3 (stable) If you've been waiting for a sign to explore MikroTik's Wi-Fi 6 solutions - this is it. With RouterOS v7.19.3, MikroTik has introduced significant improvements to 802.11ax (Wi-Fi 6) device performance. This update enhances range, stability, and overall wireless experience, making it the best time yet to deploy Wi-Fi 6 in your home, office, or enterprise setup. MikroTik is continuously working to improve AX performance across all supported MikroTik devices, and this update is a major step forward. Whether you're using a single AP or building a complex multi-device setup, you'll notice the difference. But there's more to this update: from enhanced IPv6 FastPath support to hardened RADIUS (RadSec) and smarter LTE/eSIM handling, the system is now more robust under real-world stress. For best results and security, always use the latest stable RouterOS version. Version 7.19.3 is currently our recommended release for anyone using Wi-Fi 6 hardware. #MikroTik#RouterOS#AlagasNet#LatestSoftware