En Fri, 28 Aug 2009 01:50:37 -0300, Xavier Ho <[email protected]> escribió:
On Fri, Aug 28, 2009 at 2:35 PM, Ben Finney
<[email protected]<ben%[email protected]>
wrote:

   op_funcs = {
       '+': operator.add,
       '-': operator.sub,
       '*': operator.mul,
       '/': operator.div,
       }
   op_prompt = "Select an operator ({}):".format(','.join(op for op in
op_funcs))

op_prompt = "Select an operator ({}):".format(','.join(op_funcs))

Just fixing the code a little to be more "Pythonic" ;).

Even more ;)

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to