Il dom, 2003-02-09 alle 22:55, Martijn Brouwer ha scritto:
> I read this code example in the faq about caputering key strokes.
> I do not understand the meaning of *args. It looks like a c pointer ;-) I guess it 
>is something else, but I could not find anything in the python docs.

>  def on_key_press(widget, event, *args):

in python a function/method argument specified as *grok will let you
call the function/method with a variable numer of arguments and put the
excediing ones in "grok". i.e.,

>>> def foo(a, b, *grok):
...     print grok

>>> foo(1,2,3,4)
(3,4)

-- 
Federico Di Gregorio
Debian GNU/Linux Developer                                [EMAIL PROTECTED]
INIT.D Developer                                           [EMAIL PROTECTED]
                           Don't dream it. Be it. -- Dr. Frank'n'further

Attachment: signature.asc
Description: PGP signature

Reply via email to