-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 类的 6 种替代方案 #8202
Python 类的 6 种替代方案 #8202
Conversation
@@ -109,15 +109,15 @@ def get_distance(p1: Dict[str, Any], | |||
pass | |||
``` | |||
|
|||
The annotation in practice is really bad. It’s almost always `Dict[str, Any]` in the best case. Often, there is no annotation. | |||
在实际中,注解确实很糟糕,字典的注解在多数情况下几乎总是 `Dict[str, Any]` 。通常,没有注解。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在实际中,注解确实很糟糕,字典的注解在多数情况下几乎总是 `Dict[str, Any]` 。通常,没有注解。 | |
在实际中,注解确实很糟糕。通常来说几乎没有字典的注解,而一般来说,最佳的注解会是 `Dict[str, Any]` 。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的 best 可以看看这个链接,我觉得属于是第三个意思 绝大多数情况,因为 Dict[str, Any]
这个注解属于不好的注解,包含了所有的类型。
可以改成:
在实际中,注解确实很糟糕。通常来说几乎没有字典的注解,在大部分情况下的注解会是 Dict[str, Any]
。
@flying-yogurt 欢迎校对 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Hao Ren <haoren.2906@gmail.com> Co-authored-by: Hoarfroster <penguin.zhang@qq.com>
@Alfxjx 麻烦添加一下译者和校对者信息哈 |
@PassionPenguin @flying-yogurt 感谢校对 已经修改啦 |
@Alfxjx 已经 merge 啦~ 快快麻溜发布到掘金然后给我发下链接,方便及时添加积分哟。 掘金翻译计划有自己的知乎专栏,你也可以投稿哈,推荐使用一个好用的插件。 |
|
@Alfxjx 收到 |
译文翻译完成,resolve #8144
第一次尝试 python 文章,大大们帮偶狠狠挑挑刺