3
ruamel.yaml.RoundTripRepresenter.add_representer(type(None), represent)
工作正常如何在舊版本使用申述ruamel.yaml的(版本<= 0.11)在<code>0.14.X</code>版本ruamel.yaml包的
如何在舊版本使用相同的功能(< = 0.11)ruamel.yaml軟件包還是以前版本的軟件包使用的替代方法?
我這裏是我的程序運行上面的代碼
def represent(self, data):
return self.represent_scalar(u'tag:yaml.org,2002:null', u'NULL')
ruamel.yaml.RoundTripRepresenter.add_representer(type(None), represent)
data = ruamel.yaml.round_trip_load(input.yaml)
ruamel.yaml.round_trip_dump(data, output.yaml)
同時獲得以下錯誤
ruamel.yaml.RoundTripRepresenter.add_representer(type(None), represent_none)\nAttributeError: 'module' object has no attribute 'RoundTripRepresenter'
你爲什麼要使用ruamel.yaml <= 0.11 – Anthon
ruamel.yaml(版本:0.10.11)是默認包在我們定製ISO, –
是否有機會獲得關於該定製ISO的更多信息(可能通過電子郵件)?只是出於對我的軟件包使用方式/地點的興趣。 – Anthon