[Tutor] Suppressing output in interactive mode

Kent Johnson kent37 at tds.net
Sat Jan 12 14:09:08 CET 2008


Olivier Lefevre wrote:
>> Then assign the return value to a variable and never use it.
> 
> That feels obfuscated; definitely not an elegant solution.
> When I'm done with interactive development and save the
> substance to a script I'd have to chase these bogus
> assignments to junk variables and remove them; not a
> smooth workflow.

FWIW I do most development in an editor and save the interpreter for 
small snippets and interactive exploration. Many editors can be set up 
to execute Python code with a keystroke and show the results in another 
window.

Unit tests help with incremental development too - a unit test can 
exercise the code you are working on.

Kent


More information about the Tutor mailing list