Closed aisk closed 4 years ago
Codes to reproduce this:
test.thrift
struct Container { 1: A field1; 2: list<A> field2; 3: list<map<string, A>> field3; } struct A { 1: string value }
test.py
import thriftpy2 from pprint import pprint test_thrift = thriftpy2.load('./test.thrift') pprint(test_thrift.Container.thrift_spec)
output:
{1: (12, 'field1', <class 'test.A'>, False), 2: (15, 'field2', (12, <class 'test.A'>), False), 3: (15, 'field3', (13, (11, -3)), False)}
Notice the field3, it's spec is expected to be (15, 'field3', (13, (11, <class 'test.A'>)), False) like field2.
field3
(15, 'field3', (13, (11, <class 'test.A'>)), False)
field2
I think it is a bug
Codes to reproduce this:
test.thrift
test.py
output:
Notice the
field3
, it's spec is expected to be(15, 'field3', (13, (11, <class 'test.A'>)), False)
likefield2
.