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 слични објави

Пребарај: #releases

当前筛选 #releases清除筛选
Go

@golang · Post #24 · 25.01.2018 г., 23:12

GoLang 1.10 Release notes has been added! Go 1.10 is not yet released. These are work-in-progress release notes. Go 1.10 is expected to be released in February 2018. This release: - caching of built packages; - adds caching of successful test results; - runs vet automatically during tests; - permits passing string values directly between Go and C using cgo. #golang#news#releases See more: https://tip.golang.org/doc/go1.10

Go

@golang · Post #43 · 26.02.2018 г., 14:15

I hope everyone knows about the latest GoLang release 1.10. If it isn’t than here is an article with top interesting and important changes and improvements which have been released in a new version of GoLang. Fast reading about 8 mins 😉 #language#development#releases https://medium.com/@thuc/whats-changes-in-golang-1-10-d3022fbade3c?source=linkShare-b636419a57de-1519654220

✈️Github-Store | 把 GitHub Releases 变成应用商店,这样找安装包更方便 🏷 检索标签:#GithubStore#GitHub#开源软件#Releases#应用商店 ⭐️ 详情介绍:Github-Store 是个专门给 GitHub 做的“应用商店式”发现与安装工具,解决的就是在仓库里翻半天才找到正确安装包的老问题,适合经常从 GitHub 装工具、又不想每次都进 Releases 里逐个点文件的人它会自动把那些真的带 可安装二进制 的项目挑出来,按 热门/最近更新/新发布 给你刷一遍,再根据你的平台把 APK、EXE、DMG、RPM 这类安装文件筛到位 📖Github · 🪟Releases下载 😌频道 |🙂群聊 |😋中文包 |☺️搜索

BotsGram®

@botsgram_cu · Post #3165 · 25.11.2020 г., 11:17

@newreleasesiobot Qué puede hacer este bot? Este bot lanza notificaciones de muchas plataformas de programación GitHub, Docker, PyPI, Maven, Gems, NPM, Yarn ... Idioma: Inglés (visto en @BotsGram.cu) #releases, #version, #github, #docker, #maven, #npm, #yarn, #git, #bitbucket, #notifications