Arnaud Delobelle <arno...@gmail.com> writes:

> Ben Finney <ben+pyt...@benfinney.id.au> writes:
> [...]
> >     commands = {
> >         'q': (lambda: quit()),
> >         'c': (lambda: prompt_and_convert_temperature(
> >                 ["Celsius", "Fahrenheit"], celsius_to_fahrenheit)),
> >         'f': (lambda: prompt_and_convert_temperature(
> >                 ["Fahrenheit", "Celsius"], fahrenheit_to_celsius)),
>
>           None: print_commands,

This would be counter to the problem as stated by the OP. The program
originally described loops *only* if no other command is specified;
yours doesn't distinguish.

-- 
 \     “It is far better to grasp the universe as it really is than to |
  `\    persist in delusion, however satisfying and reassuring.” —Carl |
_o__)                                                            Sagan |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to