@BGP_Channel · Post #5031 · 07.04.2021 г., 15:15
#liying#BGP CNGZ-QCloud #SS#Trojan#XTLS 官网 liyingcloud.org 群组 @liyingcloud 频道 @liyingyun Twitter: https://s.4a.hk/CJU9Z1L
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
Пребарај: #xtls
@BGP_Channel · Post #5031 · 07.04.2021 г., 15:15
#liying#BGP CNGZ-QCloud #SS#Trojan#XTLS 官网 liyingcloud.org 群组 @liyingcloud 频道 @liyingyun Twitter: https://s.4a.hk/CJU9Z1L
@BGP_Channel · Post #5077 · 24.04.2021 г., 15:47
#liying#Trojan#SS#XTLS#BGP CNGZ-QCloud #VPN 仅测速腾讯云+阿里云入口节点 @liyingyun
@BGP_Channel · Post #5005 · 30.03.2021 г., 15:08
#liying#BGP CNGZ-QCloud #SS#Trojan#XTLS#VPN 官网 liyingcloud.org 频道 @liyingyun 群组 @liyingcloud Twitter: https://s.4a.hk/bVmb3mI
@BGP_Channel · Post #5046 · 12.04.2021 г., 15:52
#liying#BGP CNSH-QCloud #SS#Vmess#Trojan#XTLS#VPN 频道 @liyingyun 群组 @liyingcloud 官网 liyingcloud.org
@BGP_Channel · Post #5094 · 29.04.2021 г., 16:47
#liying#南方#电信#Trojan#SS#XTLS#v2ray 500M
@githubtrending · Post #14723 · 19.05.2025 г., 13:00
#go#anticensorship#dns#network#proxy#reality#shadowsocks#socks5#tls#trojan#tunnel#utls#vision#vless#vmess#vpn#wireguard#xhttp#xray#xtls#xudp Project X offers powerful network tools like Xray-core and REALITY, built on the efficient XTLS protocol that improves speed and security by reducing unnecessary encryption. It features advanced routing and fallback systems to keep your internet traffic safe and uninterrupted, ideal for streaming or video calls. The project is open-source under Mozilla Public License 2.0, encouraging community contributions to keep it evolving. You can easily install it on various platforms using official scripts, Docker, or one-click setups, and use many supported GUI clients on Windows, Linux, Android, iOS, and routers. This flexibility and strong security help you optimize and protect your network experience. https://github.com/XTLS/Xray-core