Paul Rubin <http://[EMAIL PROTECTED]> 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 -- [EMAIL PROTECTED] -- 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 -- http://mail.python.org/mailman/listinfo/python-list