Forwarded from Находки в опенсорсе
⚡️ Breaking news!
Python3.10 was released several hours ago (not so breaking news, right?). One of the main new features is pattern matching.
Today, I am releasing
Cool, isn't it? Today Python made one more giant step for better functional programming support. And no doubt, that
Check out our:
- Docs: https://returns.readthedocs.io/en/latest/pages/result.html#pattern-matching
- Release notes: https://github.com/dry-python/returns/releases/tag/0.17.0
- Python3.10 release notes: https://docs.python.org/3.10/whatsnew/3.10.html
Soon we will be adding pattern matching support for mypy as well. So, it would be type checked correctly.
Big day for #python!
Python3.10 was released several hours ago (not so breaking news, right?). One of the main new features is pattern matching.
Today, I am releasing
dry-python/returns@0.17.0 with full pattern matching support. Here's an example of how you can use it together with Result type:from returns.result import Failure, Success, safe
@safe
def div(first_number: int, second_number: int) -> int:
return first_number // second_number
match div(1, 0):
# Matches if the result stored inside `Success` is `10`
case Success(10):
print('Result is "10"')
# Matches any `Success` instance and binds its value to the `value` variable
case Success(value):
print('Result is "{0}"'.format(value))
# Matches if the result stored inside `Failure` is `ZeroDivisionError`
case Failure(ZeroDivisionError):
print('"ZeroDivisionError" was raised')
# Matches any `Failure` instance
case Failure(_):
print('The division was a failure')
Cool, isn't it? Today Python made one more giant step for better functional programming support. And no doubt, that
dry-python is the first one to officially support it.Check out our:
- Docs: https://returns.readthedocs.io/en/latest/pages/result.html#pattern-matching
- Release notes: https://github.com/dry-python/returns/releases/tag/0.17.0
- Python3.10 release notes: https://docs.python.org/3.10/whatsnew/3.10.html
Soon we will be adding pattern matching support for mypy as well. So, it would be type checked correctly.
Big day for #python!
Forwarded from PowerShell
This media is not supported in your browser
VIEW IN TELEGRAM
📦Customize Windows11
#prog #dotnet
Сейчас в .NET разворачивается целая драма! Запасаемся попкорном!
TL;DR: в .NET 6 Preview добавили поддержку hot reload, а после этого выпилили, чтобы … *брабанная дробь* … добавить его как уникальную фичу в Visual Studio! Ну разве не гениально?!
P.S.: да, в ПР, в котором удалили поддержку этой фичи были сразу же после аппрува отключены комменты)))
P.P.S.: призываю всех пройти помочь аппрувами
Сейчас в .NET разворачивается целая драма! Запасаемся попкорном!
TL;DR: в .NET 6 Preview добавили поддержку hot reload, а после этого выпилили, чтобы … *брабанная дробь* … добавить его как уникальную фичу в Visual Studio! Ну разве не гениально?!
P.S.: да, в ПР, в котором удалили поддержку этой фичи были сразу же после аппрува отключены комменты)))
P.P.S.: призываю всех пройти помочь аппрувами
GitHub
Hot Reload removed from dotnet watch - Why? · Issue #22247 · dotnet/sdk
Hot Reload functionality in dotnet watch was recently deleted and it seems that Hot Reload will be VS-only going forward. I've been using that functionality in dotnet watch happily for a while ...
Some <| CoolStuff()
#prog #dotnet Сейчас в .NET разворачивается целая драма! Запасаемся попкорном! TL;DR: в .NET 6 Preview добавили поддержку hot reload, а после этого выпилили, чтобы … *брабанная дробь* … добавить его как уникальную фичу в Visual Studio! Ну разве не гениально?!…
JetBrains набрасывает)
Twitter
JetBrains Rider
Don't worry folks, we won't leave you reloading in the cold. 🔥