【问题标题】:SyntaxError: keyword can't be an expression in GAEpythonSyntaxError:关键字不能是 GAEpython 中的表达式
【发布时间】:2015-12-07 22:00:05
【问题描述】:
def email_status(self, mail_ref):
        mails_storage = EmailsStorage().Key(urlsafe=mail_ref)
        maillog = EmailLogs.query(EmailLogs.email_key=mails_storage)
        return mails_storage.get(), mails_log

它说 SyntaxError:keyword can't be an expression。我是 GAEpython 新手,不知道出了什么问题。

追溯

【问题讨论】:

标签: python-2.7 google-app-engine


【解决方案1】:

在你的查询中你有=而不是==,你需要

    maillog = EmailLogs.query(EmailLogs.email_key == mails_storage)

而不是

    maillog = EmailLogs.query(EmailLogs.email_key=mails_storage)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-04
    • 2019-10-07
    • 1970-01-01
    • 1970-01-01
    • 2020-02-10
    • 2016-09-26
    相关资源
    最近更新 更多