From: Dan S. <dan...@hp...> - 2010-04-19 18:16:32
|
We have a build process that uses YAML - pyyaml specifically, not pyyaml-legacy. When our automated processes put things in the YAML files, the YAML parsing works. But every once in a while a human adds something to a YAML file, and sometimes these humans don't add blanks after the colons, and then the process blows up. I've been asked to come up with a YAML parser that will be more lenient about not having a blank after a colon. EG, right now, this doesn't work for us: invoice: 34843 date : 2001-01-23 bill-to: &id001 given :Chris family : Dumars ...because "given :Chris" has no space after the colon. So I have some questions: 1) Is there already a YAML parser that relaxes this? 2) How can I tell what version of pyyaml we are using? I see the module names match those of pyyaml, but when grep'ing those modules for "version", I don't see anything that looks like a version string 3) I see that pyyaml's trunk has a "tests" directory - how would I invoke these? Can anyone comment on how comprehensive these tests are? 4) Does pyyaml currently insist on a blank after a colon for a good reason? Would eliminating the requirement introduce an ambiguity? TIA! |