This repository has been archived by the owner on Dec 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 286
thrift struct 的一个变量被命名为了 from, 在解析时未报错,但是在调用时报错了。版本是 0.3.9。 #231
Comments
I think the best solution is, just avoid using python keywords as thrift struct field... |
Apache thrift dose not reserve self.from = from
self.to = to
self.orderId = orderId
self.sourceEnum = sourceEnum thriftpy parser will consistent to apache thrift's behavior. For this issue, I suggest you do not use python keywords as thrift struct fields. |
Parser fixed in #232, |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
遇到一个问题:thrift struct 的一个变量被命名为了 from, 在解析时未报错,但是在调用时报错了。
版本是 0.3.9
具体如下:
issue.thrift 内容如下
issue.py 的内容如下:
运行结果如下:
The text was updated successfully, but these errors were encountered: