dry-python / dry-python/returns

Further explanation needed

未关闭
#1,049 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
documentation enhancement good first issue help wanted
主要语言
Python
星标
4.4k
派生
155
平均合并
2 小时 27 分钟
30 天内合并 PR
22

描述

Hi all,

Big fan of functional programming. I'm glad to see ya'll trying to bring this to Python. My question / request is pretty basic, I hope. I was looking over the docs and I saw:

`result: Result[int, Any] = Success(1).map(double)`

When looking at this I was confused for a couple of reasons, since the syntax is new to me. But the biggest stumbling block was the:

`result:`

I couldn't find a clear discussion in the documentation for what `thing:` means. Can you explain this syntax before using it in the document? I am also confused about why you would set this equal to a type? It's not clear to me how or why this works from a syntax standpoint.

Hope these are fair comments and easy to resolve!

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。