Re: doctest and exposing internals.

2006-10-20 Thread Neil Cerutti
On 2006-10-20, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > At Friday 20/10/2006 16:29, Neil Cerutti wrote: >>The example of correct usage it what's wrong with the >>docstring. >> >>There's no interface for checking if an event is queued in Glk, >>so I resorted to exposing the internal state main

Re: doctest and exposing internals.

2006-10-20 Thread Gabriel Genellina
At Friday 20/10/2006 16:29, Neil Cerutti wrote: The example of correct usage it what's wrong with the docstring. There's no interface for checking if an event is queued in Glk, so I resorted to exposing the internal state main.char_request in the doc string. What are the alternatives? - what

doctest and exposing internals.

2006-10-20 Thread Neil Cerutti
I'm using doctest for the first time, and boy is it cool. But I'm nervous about exposing library internals in the docstring. def glk_cancel_char_event(win): """ Cancel a pending request for character input. win must be a valid Glk window. >>> glk_cancel_char_event([]) Gl