<div dir="ltr">Matthew, we use not only load, but also dump. We can't use custom constructor and default representer - the output will be terrible. <div>This custom constructor contains about 50 lines of code, representer would have a similar count. Also, we should think about compatibility with Python 2.7, 3.x and about it's performance. </div><div>Summary, we would have about 150 lines of code, which is just copy-paste from `yamlloader` library.</div><div>IMHO, it is better to use existing solutions. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">чт, 14 февр. 2019 г. в 19:14, Matthew Thode <<a href="mailto:mthode@mthode.org">mthode@mthode.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 19-02-14 16:58:49, Oleg Ovcharuk wrote:<br>
> Hi! Can you please add yamlloader library to global requirements?<br>
> <a href="https://pypi.org/project/yamlloader/" rel="noreferrer" target="_blank">https://pypi.org/project/yamlloader/</a><br>
> <br>
> It provides ability to preserve key order in dicts, it supports either<br>
> python 2.7 and python 3.x, it provides better performance than built-in<br>
> functions.<br>
> Thank you.<br>
<br>
I'd like to know a little more about why we need this, yaml as a spec<br>
itself doesn't guarantee order so order should be stored somewhere else.<br>
<br>
If all you need is ordereddict support something like this may be better<br>
then adding yet another lib.<br>
<br>
<a href="https://gist.github.com/enaeseth/844388" rel="noreferrer" target="_blank">https://gist.github.com/enaeseth/844388</a><br>
<br>
-- <br>
Matthew Thode<br>
</blockquote></div>