我想使用python运行KDB并从
下载kdb.pyhttps://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:语法无效
有人帮我吗? 谢谢!
答案 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