Re: : in the flow context for PyYAML and SnakeYAML
Andrey Somov <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <[email protected]> |
I still do not understand why we do not follow the spec:
1) {a:1} -> {"a:1": null} (yes, it is not intuitive, but according to the spec)
2) {url: http://dot.com} -> "url": "http://dot.com"
I think it is better to implement p.1 instead of the current failure
because we can give a chance to a user to fix the problem at runtime.
>I strongly disagreed with it because it does not follow Python or Javascript conventions,
>but I didn't want to decide one way or another until some consensus is reached.
>So I made ':' (colon followed by a non-whitespace character) an error when it is a part of a plain literal in the flow context.
People agree on the specification exactly to avoid personal flavors.
For instance I totally disagree to have 18 (!!!) possible alternatives
for a boolean value but nevertheless I had to implement them all.
SnakeYAML does not fail on 'Yes'. (even though I am sure it should be
just !!str)
Since 1.2 specification did not make any change about a colon on the
flow context I feel it is better to follow the spec. I think that this
is the indication that the consensus is reached.
-Andrey
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d