What value should be passed to make a function use the default argument value?

Antoon Pardon apardon at forel.vub.ac.be
Thu Oct 5 16:41:08 CEST 2006

On 2006-10-04, Fredrik Lundh <fredrik at pythonware.com> wrote:
> Georg Brandl wrote:
>> This is an issue in most Python documentation: you're not told
>> if the described function is implemented in C, and if it is
>> keyword arg-enabled. The arguments must be given names though,
>> to be able to document them.
> the general rule is that if the documentation doesn't explicitly say 
> that something is a keyword argument, it isn't, and shouldn't be treated 
> as such.

The first module I looked in to check this, it wasn't true. In the Queue
Module is isn't explicitly written that maxsize is a keyword argument yet
Queue.Queue(maxsize=9) works just fine.

I then took a look in the Threading module and found that the semaphore
documentation didn't mention anything about keyword arguments but
again they worked fine.

It wouldn't surprise me if this was true for the complete threading

Antoon Pardon

More information about the Python-list mailing list