Openstack Python 代码 **kwargs -> help=_('Password for connection to nova in admin context')
Openstack Python code **kwargs -> help=_('Password for connection to nova in admin context')
我想分析 OpenStack 代码以供研究。
但我不熟悉Python。
我不明白为什么该代码有一个 under score -> help=_('string')
我在 python 书中找不到那个形状
请帮助我了解 python 中那个语法的用法 谢谢
这是带有 cfg 模块的 oslo_config 包...
class oslo_config.cfg.BoolOpt(名称, **kwargs)
参数:
名称——选项的名称
**kwargs – 传递给 Opt
的任意关键字参数
from oslo_config import cfg
core_opts = [
cfg.BoolOpt('allow_bulk', default=True,
help=_("Allow the usage of the bulk API")),
cfg.BoolOpt('allow_pagination', default=False,
help=_("Allow the usage of the pagination")),
cfg.StrOpt('api_paste_config', default="api-paste.ini",
help=_("The API paste config file to use")),
cfg.StrOpt('api_extensions_path', default="",
help=_("The path for API extensions")),
我想分析 OpenStack 代码以供研究。 但我不熟悉Python。 我不明白为什么该代码有一个 under score -> help=_('string') 我在 python 书中找不到那个形状 请帮助我了解 python 中那个语法的用法 谢谢 这是带有 cfg 模块的 oslo_config 包...
class oslo_config.cfg.BoolOpt(名称, **kwargs)
参数: 名称——选项的名称 **kwargs – 传递给 Opt
的任意关键字参数from oslo_config import cfg
core_opts = [
cfg.BoolOpt('allow_bulk', default=True,
help=_("Allow the usage of the bulk API")),
cfg.BoolOpt('allow_pagination', default=False,
help=_("Allow the usage of the pagination")),
cfg.StrOpt('api_paste_config', default="api-paste.ini",
help=_("The API paste config file to use")),
cfg.StrOpt('api_extensions_path', default="",
help=_("The path for API extensions")),