announce: FAQs suggested
theller at ctypes.org
Fri Nov 10 21:09:35 CET 2006
p.lavarre at ieee.org schrieb:
> Thanks again for making time to comment - insights into the perspective
> of the author are invaluable. But if by chance you have time to
>> > > http://effbot.org/pyfaq/suggest.htm
>> > http://docs.python.org/dev/lib/ctypes-return-types.html
>> A note could probably be added to this section.
> Good. Next: Is there a place on the web where we can log that
> conclusion to inspire its resolution?
The canonical place is the Python bug tracker. Best would be to suggest a sentence
or two for the docs.
Presonally, I would suggest to add something like this to the start of the docs, section 184.108.40.206:
220.127.116.11 Return types
By default functions are assumed to return the C int type. Other return types can be specified by setting the restype attribute of the function object.
-> For functions that do not return anything, restype should be set to None.
>> > void is missing from
>> > http://docs.python.org/dev/lib/node452.html "Fundamental data types"
>> 'void' is not a type.
> Help, lost me?
What I mean is that you cannot create 'variables' of type void in C, so I would
say it is not a type. Do you think that ctypes should define
c_void = None
I think that would really be confusing. Consider:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: 'NoneType' object is not callable
OTOH, void* is a type in C, also in ctypes, where it is spelled 'c_void_p'.
I hope this makes sense to you.
More information about the Python-list