Open
Description
It would be nice if this could work:
In []: t = ndt.type('{key: string; val: int32}')
In []: t['key']
Out[]: ndt.string
In []: t['val']
Out[]: ndt.int32
right now, one is required to do:
In []: t = ndt.type('{key: string; val: int32}')
In []: t[nd.as_py(t.field_names).index('key')]
Out[]: ndt.string
In []: t[nd.as_py(t.field_names).index('val')]
Out[]: ndt.int32
which is far more verbose (and non-trivial to figure out)