What YAML engine do you use?

Sion Arrowsmith siona at chiark.greenend.org.uk
Mon Jan 24 10:03:16 EST 2005


Paul Rubin  <http://phr.cx@NOSPAM.invalid> wrote:
>YAML looks to me to be completely insane, even compared to Python
>lists.  I think it would be great if the Python library exposed an
>interface for parsing constant list and dict expressions, e.g.:
>   [1, 2, 'Joe Smith', 8237972883334L,   # comment
>      {'Favorite fruits': ['apple', 'banana', 'pear']},  # another comment
>      'xyzzy', [3, 5, [3.14159, 2.71828, []]]]
> [ ... ]
>Note that all the values in the above have to be constant literals.
>Don't suggest using eval.  That would be a huge security hole.

I'm probably not thinking deviously enough here, but how are you
going to exploit an eval() which has very tightly controlled
globals and locals (eg. eval(x, {"__builtins__": None}, {}) ?

-- 
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
  ___  |  "Frankly I have no feelings towards penguins one way or the other"
  \X/  |    -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump



More information about the Python-list mailing list