记录** kwargs参数的正确方法是什么?

编程入门 行业动态 更新时间:2024-10-23 09:23:16
本文介绍了记录** kwargs参数的正确方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用狮身人面像和autodoc插件来为我的Python模块生成API文档。虽然我可以看到如何很好的记录具体的参数,我找不到如何记录一个 ** kwargs 参数的示例。

$ b $有没有人有一个清楚的方式来记录这些的一个很好的例子?

解决方案

我认为 子流程 -module的文档是一个很好的例子。详细列出顶级/父类。那么只需参考该列表,查找所有其他出现的 ** kwargs 。

I'm using sphinx and the autodoc plugin to generate API documentation for my Python modules. Whilst I can see how to nicely document specific parameters, I cannot find an example of how to document a **kwargs parameter.

Does anyone have a good example of a clear way to document these?

解决方案

I think subprocess-module's docs is a good example. Give an exhaustive list of all parameters for a top/parent class. Then just refer to that list for all other occurrences of **kwargs.

更多推荐

记录** kwargs参数的正确方法是什么?

本文发布于:2023-07-17 02:43:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1128570.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:正确   参数   方法   kwargs

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!