本文整理汇总了Python中yaml.constructor.SafeConstructor.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python SafeConstructor.__init__方法的具体用法?Python SafeConstructor.__init__怎么用?Python SafeConstructor.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yaml.constructor.SafeConstructor
的用法示例。
在下文中一共展示了SafeConstructor.__init__方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from yaml.constructor import SafeConstructor [as 别名]
# 或者: from yaml.constructor.SafeConstructor import __init__ [as 别名]
def __init__(self, stream):
Reader.__init__(self, stream)
Scanner.__init__(self)
Parser.__init__(self)
Composer.__init__(self)
SafeConstructor.__init__(self)
Resolver.__init__(self)
示例2: __init__
# 需要导入模块: from yaml.constructor import SafeConstructor [as 别名]
# 或者: from yaml.constructor.SafeConstructor import __init__ [as 别名]
def __init__(self, stream):
Reader.__init__(self, stream)
Scanner12.__init__(self)
Parser.__init__(self)
Composer.__init__(self)
# PKM2014 - uses SafeConstructor instead of Constructor. This should make no
# difference, because "Is it YAML?" only gets as far as the composition stage,
# but - well: it reduces the risk of something bad happening.
# Constructor.__init__(self)
SafeConstructor.__init__(self)
Resolver.__init__(self)
示例3: __init__
# 需要导入模块: from yaml.constructor import SafeConstructor [as 别名]
# 或者: from yaml.constructor.SafeConstructor import __init__ [as 别名]
def __init__(self):
self.add_multi_constructor("!vol/", self.__class__.vol_constructor)
self.add_multi_constructor("!type/", self.__class__.type_constructor)
self.add_constructor(
"!include", self.__class__.include_file_constructor)
self.add_constructor(
"!include_merge", self.__class__.include_merge_constructor)
self.add_constructor(
"!include_dir_file_mapped",
self.__class__.include_dir_file_mapped_constructor)
self.add_constructor("!env_var", self.__class__.env_var_constructor)
self.add_constructor("!path", self.__class__.path_constructor)
SafeConstructor.__init__(self)
示例4: __init__
# 需要导入模块: from yaml.constructor import SafeConstructor [as 别名]
# 或者: from yaml.constructor.SafeConstructor import __init__ [as 别名]
def __init__(self, filename):
SafeConstructor.__init__(self)
self.filename = filename