【发布时间】:2015-06-07 10:52:55
【问题描述】:
当我输入变量a时
a = int(1388620800)*1000
(当然)这个变量被返回
1388620800000
但是在Google Appengine Server中,这个变量被https://cloud.google.com/appengine/docs/python/datastore/typesandpropertyclasses#int改变了
1388620800000L
Appengine中如何将1388620800000L转换为int类型?
编辑
我将为 JSON 打印这个数字。在本地 Python2.7 中,变量 'a' 只是整数。但在 appengine 服务器中,变量“a”具有字符串“L”。我使用 str() 和 .replace('L','') 解决了它,但我想知道如何通过更改数字类型来解决它。
【问题讨论】: