kdb.py文件包含错误

问题描述 投票:0回答:1

我想使用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

python kdb
1个回答
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

© www.soinside.com 2019 - 2024. All rights reserved.