RE: return types from library api wrappers

2015-08-17 Thread Joseph L. Casale
Current practice is a NamedTuple for python code or the C equivalent. I forget the C name, but I believe it is used by os.stat Hi Terry, Ok, that is what I will go with. Thanks for the confirmation, jlc -- https://mail.python.org/mailman/listinfo/python-list

return types from library api wrappers

2015-08-16 Thread Joseph L. Casale
What's the accepted practice for return types from a c based API Python wrapper? I have many methods which return generators which yield potentially many fields per iteration. In lower level languages we would yield a struct with readonly fields. The existing implementation returns a dict which I

Re: return types from library api wrappers

2015-08-16 Thread Terry Reedy
On 8/16/2015 7:31 PM, Joseph L. Casale wrote: What's the accepted practice for return types from a c based API Python wrapper? I have many methods which return generators which yield potentially many fields per iteration. In lower level languages we would yield a struct with readonly fields.