我正在关注本教程appy.pod并且我正在创建一个或多或少的 dict 列表,如下所示:
params['reports'] = [{'date': foo.date, 'name': foo.name} for foo in something]
在 libreoffice - writer 我有一个注释
do text for foo in reports
当我执行代码时出现此错误
Syntax error while parsing a note whose content is "[]". In a note, you may specify at most 2 lines: a pod statement and a "from" clause. A Pod statement has the form: do {element} [{command} {expression}]. {element} identifies the part of the document that will be impacted by the command. It must be one of ('text', 'title', 'section', 'table', 'row', 'cell'). Optional {command} can be "if" (conditional inclusion of the element) or "for" (multiple inclusion of the element). For an "if" command, {expression} is any Python expression. For a "for" command, {expression} must be of the form: {name} in {expression}. {name} must be a Python variable name. It is the name of the iteration variable. {expression} is a Python expression that, when evaluated, produces a Python sequence (tuple, string, list, etc). A "from" clause has the form: from {expression}, where {expression} is a Python expression that, when evaluated, produces a valid chunk of odt content that will be inserted instead of the element that is the target of the note.
要记笔记,是否需要激活“跟踪更改”模式?
还有另一个相关的问题,但对我不起作用 评论被视为空,即使它们不是
有人可以帮助我,我有什么错