kdb.py文件包含错误

时间:2017-12-17 23:42:27

标签: python kdb

我想使用python运行KDB并从

下载kdb.py

https://bitbucket.org/halotis/qpy/

但是,我在第k = 86400000L * 10957行上有错误:

# 86400000 is number of milliseconds in a day
# 10957 is days offset between UNIX Epoch and kdb Epoch

k = 86400000L * 10957

SyntaxError:语法无效

有人帮我吗? 谢谢!

============================================ enter image description here

1 个答案:

答案 0 :(得分:3)

看起来你正在使用Python 3.删除后缀" L",它对整数没有影响。它在Python 2.x中有所不同,但现在它会产生语法错误。

请参阅Python 2文档:https://docs.python.org/2/reference/lexical_analysis.html#integer-and-long-integer-literals

和Python 3文档: https://docs.python.org/3.5/reference/lexical_analysis.html#integer-literals