eval to dict problems NEWB going crazy !

Fredrik Lundh fredrik at pythonware.com
Thu Jul 6 08:10:14 EDT 2006


> hint 1:

hint 1b:

>>> eval("[('recId', 3), ('parse', {'pos': u'np', 'gen': u'm'})]")
[('recId', 3), ('parse', {'pos': u'np', 'gen': u'm'})]
>>> eval("[('recId', 3), ('parse', {'pos': u'np', 'gen': u'm'})]\n")
[('recId', 3), ('parse', {'pos': u'np', 'gen': u'm'})]
>>> eval("[('recId', 3), ('parse', {'pos': u'np', 'gen': u'm'})]\r\n")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "<string>", line 1
    [('recId', 3), ('parse', {'pos': u'np', 'gen': u'm'})]
                                                          ^
SyntaxError: invalid syntax

</F> 






More information about the Python-list mailing list