documentation for PyArg_ParseTupleAndKeywords

S

Steven Bethard

I'm just starting to play around with the Python source. (Specifically,
I'm looking at adding a key argument to max/min like sorted has.) Can
anyone direct me to the documentation on how
PyArg_ParseTupleAndKeywords, etc. work? In particular, I can't figure
out how the format arg to vgetargskeywords should be specified...

Thanks,

Steve
 
P

Pierre Barbier de Reuille

Steven Bethard a écrit :
I'm just starting to play around with the Python source. (Specifically,
I'm looking at adding a key argument to max/min like sorted has.) Can
anyone direct me to the documentation on how
PyArg_ParseTupleAndKeywords, etc. work? In particular, I can't figure
out how the format arg to vgetargskeywords should be specified...

Thanks,

Steve

You have a good documentation about that on the web site ... look at
"Python/C API" and "Extending and Embedding". The second one is more a
tutorial when the first one is more a reference. But everything is
explained there !

Pierre
 
J

John Machin

Steven Bethard said:
I'm just starting to play around with the Python source. (Specifically,
I'm looking at adding a key argument to max/min like sorted has.) Can
anyone direct me to the documentation on how
PyArg_ParseTupleAndKeywords, etc. work? In particular, I can't figure
out how the format arg to vgetargskeywords should be specified...

Well I just fired up the doco gadget and pasted
"PyArg_ParseTupleAndKeywords" into the Search box and the 2nd
reference it came up with was this:

manual: Python/C API Reference Manual
section: 5.5 Parsing arguments and building values

The 1st, 3rd & 4th references were examples of calling it.

Where were _you_ looking?

If you want a few :) more examples, cd to the Modules directory of
your Python source tree and grep PyArg_Parse *.c
 
S

Steven Bethard

John said:
Well I just fired up the doco gadget and pasted
"PyArg_ParseTupleAndKeywords" into the Search box and the 2nd
reference it came up with was this:

manual: Python/C API Reference Manual
section: 5.5 Parsing arguments and building values

The 1st, 3rd & 4th references were examples of calling it.

Where were _you_ looking?

Google, which for once wasn't the right answer. I did actually find the
docs later by searching for "vgetargskeywords", finding
http://starship.python.net/crew/mwh/toext/other-calling-conventions.html
and realizing that this had to be in the Python Docs somewhere. =)

Thanks for the pointers. What's the "doco gadget" you're talking about?

Steve
 
S

Scott David Daniels

Steven said:
Thanks for the pointers. What's the "doco gadget" you're talking about?

I conclude from this question that you are not using a Windows python.
I suspect, therefore, the answer is Gilda Ratner's ".... Never mind."

--Scott David Daniels
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,212
Messages
2,571,101
Members
47,695
Latest member
KayleneBee

Latest Threads

Top