From: Clark C. E. <cc...@cl...> - 2002-09-07 20:33:05
|
On Sat, Sep 07, 2002 at 01:09:55PM -0700, Mike Orr wrote: | In contrast, Python dictionaries do not preserve the order at all. If | you print a dictionary or do dic.keys(), they come out in a random | order. Right. And I believe that Perl's Hashtable is the same. I see this has the LCD behavior (which happens to align nicely with 'function') thus key order shouldn't be part of the generic model -- as we'd like most generic YAML tools to operate on native Perl and Python constructs directly without requiring a wrapper. | Sometimes this is frustrating because it means you have to keep | a separate list around to show which order you want the elements | processed in. Right. But this is a "formatting" issue, and I'm sure we will have functions in the YAML toolset which work on the "syntax" model where key ordering, node style, and other formatting information is available. This model will obviously require a DOM or third-party object to store the YAML-specific attributes. Of course, "C" language doesn't have a generic "container" so that binding will have to use a YAML specific structure. But "C" isn't a scripting language (which is our target audience) Best, Clark |