擅长:python、mysql、java
<p>从文档到<code>ast.literal_eval</code>:</p>
<blockquote>
<p>Safely evaluate an expression node or a string containing a Python
expression. The string or node provided may only consist of the following
Python literal structures: strings, numbers, tuples, lists, dicts, booleans,
and None.</p>
</blockquote>
<p>该函数的要点是,只能使用内置数据类型。<code>datetime.date</code>不是一个。</p>