<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2013/5/31 Brett Cannon <span dir="ltr"><<a href="mailto:brett@python.org" target="_blank">brett@python.org</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
So yaml is not going to end up in the stdlib. The format is not used<br>
widely enough to warrant being added nor have to maintain a parser for<br>
such a complicated format.<br></blockquote><div><br></div><div>[citation needed]<br><br></div><div>it’s omnipresent in the ruby community *because* it’s nicer than JSON and XML, and *because* the ruby stdlib has a parser (my interpretation, of course, but not a unlikely one, imho). and again, to intercept the “unsafe” argument: naming the unsafe load function “load” creates human error. naming the safe one “load” prevents it. i’m sure of that, too: nobody may honestly say he didn’t know that “unsafe_load” is unsafe.<br>
</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">
> (Although that’s probably easily done by just not doing “import yaml”, but<br>
> “import std_yaml” or “import pyyaml2”)<br>
<br>
</div>The standard practice to to place any accelerated code in something<br>
like _yaml and then in yaml.py do a ``from _yaml import *``.<br></blockquote><div><br></div><div>that’s what i said. just that _name implies internal, implementation -specific, rapidly changing code, which doesn’t fit my vision of a strict API that “_yaml” and compatible implementations should implement. but maybe an infobox in the stdlib yaml documentation telling the user about it is sufficient.<br>
</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">
</div>But that then creates a possible position where just to read metadata<br>
you must have a 3rd-party library installed, and I view that as<br>
non-starter.<br></blockquote><div><br></div><div>that’s exactly why i presented those 3 ideas as one: they work together best (although the implementation discovery isn’t mandatory)<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
It's simpler, it's Python syntax, it's faster to parse.<br></blockquote><div><br></div><div>wrong, wrong and irrelevant.<br><br></div><div>it’s only “simpler” for certail definitions of “simple”. those definitions target compilers, not humans. python targets humans, not compilers. (that’s e.g. why it favors readability over speed)<br>
</div><div>also JSON is NOT python syntax, not even a subset: it has true, false and null instead of True, False and None, and also there’s a little hack involving escaped newlines which breaks code based on this assumption in awesome ways ;)<br>
</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
But making YAML a
first-class citizen in all of this won't happen<br>
as long as YAML is not
in the stdlib and that is not a viable option.<br></blockquote><div><br></div><div>says you.<br></div></div></div></div>