简体   繁体   English

为什么Python 3中的__all__缺少NoReturn

[英]Why is NoReturn missing from __all__ in Python 3

Looking into annotations (using Python 3.6.4), I tried from typing import * and noticed that NoReturn was not imported. 查看注释(使用Python 3.6.4)时,我尝试from typing import *并注意到未导入NoReturn

issue28556 added NoReturn to the typing library, but it's missing from the __all__ list in the 3.6 and 3.7 cpython sources. issue28556添加NoReturn到打字库,但它从丢失__all__在3.6和表3.7 CPython的来源。

Was this a deliberate omission? 这是故意遗漏的吗? Is NoReturn harmful in some way that warrants this omission? NoReturn是否在NoReturn有害于这一遗漏?

From what I gather reading the typing module code, issues and PEP 484 , this looks like a bug. 从我收集的阅读打字模块代码,问题和PEP 484的资料来看,这似乎是一个错误。 Nowhere I can see someone talking about not adding (or actually adding) NoReturn to the __all__ list of either python2 or python3 code 我无处看不到有人在谈论不添加(或实际添加) NoReturn到python2或python3代码的__all__列表中

Best way to be certain is probably submitting a new issue and waiting for a contributor to answer 最好的确定方法可能是提交新问题并等待贡献者回答

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM