announce: FAQs suggested

p.lavarre at p.lavarre at
Fri Nov 10 16:00:17 CET 2006

Thanks again for making time to comment - insights into the perspective
of the author are invaluable.  But if by chance you have time to

> > >
> >
> 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?

> > void is missing from
> > "Fundamental data types"
> 'void' is not a type.

Help, lost me?

thinks void is a type.  That's what I was reading in parallel with the
ctypes doc, as I tried to make ctypes and the Windows kernel32.dll talk
to each other.


void foo(int ii) { ii = ii; }
is a C way of saying the return type of foo is the type void, in casual
conversation among programmers.

I mean, suppose I ask you what is the return type of foo?  That is,
suppose I ask you what its ctypes restype should be?

We can answer like a C lawyer, tell me that my question is malformed,
tell me that foo returns no result, tell me that foo has no return
type, and claim that thus obviously its restype should be None, despite
the widespread string Api convention of distinguishing None from
consciously empty and not using None to mean consciously empty.

Or informally we can say the return type of foo is the type void,
because void is a type, and ctypes uses Python None to express the idea
of the void type, without adding the name c_void to tell you this.

> I don't think that this is irregular,

Have I clearly explained why defining no c_void appears irregular to me
the C-literate Python-illiterate newbie?

Maybe also relevant is my Jvm/Jni background - I'm used to seeing void
expressed there as a type, not much different than int.

Was my newbie confusion here so very unique, or do these two FAQ's
FAQ: How do I say unsigned char in ctypes?
FAQ: How do I say returns void in ctypes?

Or can we hope to improve any of: "Fundamental data types"

> > That's in the ctypes documentation, where it belongs.

Thanks again for that claim.

Now also I see that returns void is defined by:
although not by:

Once upon a time, I only knew the tutorial existed, not the reference.
The tutorial includes one well-buried mention of "see the reference
manual for details", but doesn't link to what reference manual is

I remember, as a newbie, I was slow to accept that Google shouldn't be the only thing I read to understand
the ctypes of 2.5 Python.

> ...

Thanks all for the education.

I'm clear on this now, and delighted to remove the fixme: undoc'ed
comments from my source.

More information about the Python-list mailing list