[Tutor] Suppressing output in interactive mode
alan.gauld at btinternet.com
Sat Jan 12 01:54:45 CET 2008
"Olivier Lefevre" <lefevrol at yahoo.com> 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.
Why remove them? They shouldn't hurt performance
and you only need one re-used for each expression.
However I'm curious how you save your interactive sesssion
to a script? I normally only write fragments at the >>> prompt
and retype them into my script - there would be so much
tweaking needed that its just as fast I think.
(I tend to use single letter variables etc at the >>> whereas
real scripts will have longer names and comments and
spacing and more error handling etc)
How are you using the prompt?
Author of the Learn to Program web site
More information about the Tutor