thriftrw / thriftrw-python

A Thrift encoding library for Python
MIT License
36 stars 10 forks source link

module.__types__ is a tuple for primitive typedefs #124

Open abhinav opened 8 years ago

abhinav commented 8 years ago

For certain primitive typedefs, module.__types__ contains a tuple of types rather than a single class. For example,

In [2]: import thriftrw

In [3]: l = thriftrw.loader.Loader()

In [6]: m = l.loads('x', 'typedef i32 foo')

In [7]: m.__types__
Out[7]: ((int, long, numbers.Integral),)